Skip to content
Permalink
Browse files
support c++11
  • Loading branch information
otakuto committed Jan 25, 2017
1 parent d39417c commit 9e69b80b10b13999271787cfe56424d7fe3db98b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 2.8.0)
project(CrazyDiskInfo CXX)
add_executable(CrazyDiskInfo main.cpp)
set(CMAKE_CXX_FLAGS "-Wall -std=c++14")
set(CMAKE_CXX_FLAGS "-Wall -std=c++11")
SET_TARGET_PROPERTIES(CrazyDiskInfo PROPERTIES OUTPUT_NAME crazy)
target_link_libraries(CrazyDiskInfo atasmart)
target_link_libraries(CrazyDiskInfo ncursesw)
@@ -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)
{

0 comments on commit 9e69b80

Please sign in to comment.