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