- fixed few warnings
This commit is contained in:
@@ -47,7 +47,7 @@ void NullTimer::run()
|
||||
// Sleep for mInterval - mTail milliseconds
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(mInterval * 1000 - mTail));
|
||||
|
||||
mTail += std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now() - timestamp).count();
|
||||
mTail += (int)std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now() - timestamp).count();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ uint64_t StringHelper::toUint64(const char* s, uint64_t def, bool *isOk)
|
||||
{
|
||||
uint64_t result = def;
|
||||
#if defined(TARGET_WIN)
|
||||
if (sscanf(s, "%d", &result) != 1)
|
||||
if (sscanf(s, "%I64d", &result) != 1)
|
||||
#else
|
||||
if (sscanf(s, "%llu", &result) != 1)
|
||||
#endif
|
||||
@@ -290,7 +290,7 @@ static int hex2code(char s)
|
||||
|
||||
static int hex2code(const char* s)
|
||||
{
|
||||
return hex2code(s[0]) << 4 + hex2code(s[1]);
|
||||
return (hex2code(s[0]) << 4) + hex2code(s[1]);
|
||||
}
|
||||
|
||||
std::string StringHelper::fromHex2String(const std::string& s)
|
||||
|
||||
@@ -208,6 +208,8 @@ bool Variant::operator == (const Variant& rhs) const
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Variant::operator != (const Variant& rhs) const
|
||||
|
||||
@@ -528,9 +528,9 @@ std::string SevanaPVQA::mosToColor(float mos)
|
||||
|
||||
float mosFraction = (mos - 1.0f) / 4.0f;
|
||||
|
||||
end.mBlue += (start.mBlue - end.mBlue) * mosFraction;
|
||||
end.mGreen += (start.mGreen - end.mGreen) * mosFraction;
|
||||
end.mRed += (start.mRed - end.mRed) * mosFraction;
|
||||
end.mBlue += (uint8_t)((start.mBlue - end.mBlue) * mosFraction);
|
||||
end.mGreen += (uint8_t)((start.mGreen - end.mGreen) * mosFraction);
|
||||
end.mRed += (uint8_t)((start.mRed - end.mRed) * mosFraction);
|
||||
|
||||
return end.toHex();
|
||||
}
|
||||
@@ -866,7 +866,7 @@ SevanaAqua::PFaultsReport SevanaAqua::loadFaultsReport(std::istream& input)
|
||||
if (parts.size() >= 3)
|
||||
{
|
||||
if (parts.back() == "ms.")
|
||||
result->mSignalAdvancedInMilliseconds = std::atof(parts[parts.size() - 2].c_str());
|
||||
result->mSignalAdvancedInMilliseconds = (float)std::atof(parts[parts.size() - 2].c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -879,7 +879,7 @@ SevanaAqua::PFaultsReport SevanaAqua::loadFaultsReport(std::istream& input)
|
||||
if (parts.size() >= 3)
|
||||
{
|
||||
if (parts.back() == "percent.")
|
||||
result->mMistimingInPercents = std::atof(parts[parts.size() - 2].c_str());
|
||||
result->mMistimingInPercents = (float)std::atof(parts[parts.size() - 2].c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user