hwmon.cpp (09791857fd5322e558ca5238f55ec0f914140b5a) | hwmon.cpp (043d32306e00484afc446a44789b61869ea14f84) |
---|---|
1#include "hwmon.hpp" 2 | 1#include "hwmon.hpp" 2 |
3namespace hwmon { | 3namespace hwmon 4{ |
4 5bool getAttributes(const std::string& type, Attributes& attributes) 6{ 7 // *INDENT-OFF* | 5 6bool getAttributes(const std::string& type, Attributes& attributes) 7{ 8 // *INDENT-OFF* |
8 auto a = std::find_if( 9 typeAttrMap.begin(), 10 typeAttrMap.end(), 11 [&](const auto & e) 12 { 13 return type == getHwmonType(e); 14 }); | 9 auto a = 10 std::find_if(typeAttrMap.begin(), typeAttrMap.end(), 11 [&](const auto& e) { return type == getHwmonType(e); }); |
15 // *INDENT-ON* 16 17 if (a == typeAttrMap.end()) 18 { 19 return false; 20 } 21 22 attributes = *a; 23 return true; 24} 25 | 12 // *INDENT-ON* 13 14 if (a == typeAttrMap.end()) 15 { 16 return false; 17 } 18 19 attributes = *a; 20 return true; 21} 22 |
26} // namespace hwmon | 23} // namespace hwmon |