1 #include "hwmon.hpp" 2 3 namespace hwmon { 4 5 bool getAttributes(const std::string& type, Attributes& attributes) 6 { 7 // *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 }); 15 // *INDENT-ON* 16 17 if (a == typeAttrMap.end()) 18 { 19 return false; 20 } 21 22 attributes = *a; 23 return true; 24 } 25 26 } // namespace hwmon 27