Commit cc191682 authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

FIX string to long or long long instead of int #50 #62

parent 30353ef1
......@@ -231,7 +231,7 @@ int DAVIDE::getSamples()
{
struct json_array_element_s* arr = ((struct json_array_s*)data->value->payload)->start;
data = ((struct json_object_s*)arr->value->payload)->start;
long long numOfSamples = std::stoi(std::string(((struct json_string_s*)data->value->payload)->string));
long long numOfSamples = std::stoll(std::string(((struct json_string_s*)data->value->payload)->string));
if (numOfSamples == 0)
{
std::cerr << "MERIC ERROR: no power samples from DiG\n";
......
......@@ -348,9 +348,9 @@ void Environment::getSystemDefaultSettings()
std::ifstream ucfRestoreFile;
ucfRestoreFile.open (uncoreFrequencyDefaultFile);
ucfRestoreFile >> ucfString;
defaultSettings[systemType].minUncoreFreq = std::stoi(ucfString);
defaultSettings[systemType].minUncoreFreq = std::stol(ucfString);
ucfRestoreFile >> ucfString;
defaultSettings[systemType].maxUncoreFreq = std::stoi(ucfString);
defaultSettings[systemType].maxUncoreFreq = std::stol(ucfString);
ucfRestoreFile.close();
defaultSettings[systemType].defaultUncoreFreq = defaultSettings[systemType].maxUncoreFreq;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment