1
0
Fork 0
mirror of https://github.com/otakuto/crazydiskinfo.git synced 2025-07-22 22:25:27 +00:00

support c++11

This commit is contained in:
otakuto 2017-01-26 06:41:23 +09:00
parent d39417c165
commit 9e69b80b10
2 changed files with 4 additions and 4 deletions

View file

@ -161,7 +161,7 @@ Health attributeToHealth(Attribute const & attribute)
Health smartToHealth(SMART const & smart)
{
return attributeToHealth(*std::max_element(smart.attribute.cbegin(), smart.attribute.cend(), [](auto lhs, auto rhs)
return attributeToHealth(*std::max_element(smart.attribute.cbegin(), smart.attribute.cend(), [](Attribute const & lhs, Attribute const & rhs)
{
return static_cast<int>(attributeToHealth(lhs)) < static_cast<int>(attributeToHealth(rhs));
}));
@ -426,7 +426,7 @@ int main()
}
}
}
std::sort(smartList.begin(), smartList.end(), [](auto lhs, auto rhs){return lhs.deviceName < rhs.deviceName;});
std::sort(smartList.begin(), smartList.end(), [](SMART const & lhs, SMART const & rhs){return lhs.deviceName < rhs.deviceName;});
if (smartList.size() == 0)
{