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