blob: 4eb47ae0e65b99e381a9db7ab2c288a9e640da12 [file] [log] [blame]
#include "hwmon.hpp"
namespace hwmon {
bool getAttributes(const std::string& type, Attributes& attributes)
{
// *INDENT-OFF*
auto a = std::find_if(
typeAttrMap.begin(),
typeAttrMap.end(),
[&](const auto & e)
{
return type == getHwmonType(e);
});
// *INDENT-ON*
if (a == typeAttrMap.end())
{
return false;
}
attributes = *a;
return true;
}
} // namespace hwmon