Use getter functions when accessing string fields in RGBControllers in ProfileManager and cli

This commit is contained in:
Adam Honse 2025-07-31 18:36:38 -05:00
parent abd34f1810
commit 9fb71a30ec
2 changed files with 22 additions and 22 deletions

16
cli.cpp
View file

@ -477,33 +477,33 @@ void OptionListDevices(std::vector<RGBController *>& rgb_controllers)
/*---------------------------------------------------------*\
| Print device description |
\*---------------------------------------------------------*/
if(!controller->description.empty())
if(!controller->GetDescription().empty())
{
std::cout << " Description: " << controller->description << std::endl;
std::cout << " Description: " << controller->GetDescription() << std::endl;
}
/*---------------------------------------------------------*\
| Print device version |
\*---------------------------------------------------------*/
if(!controller->version.empty())
if(!controller->GetVersion().empty())
{
std::cout << " Version: " << controller->version << std::endl;
std::cout << " Version: " << controller->GetLocation() << std::endl;
}
/*---------------------------------------------------------*\
| Print device location |
\*---------------------------------------------------------*/
if(!controller->location.empty())
if(!controller->GetLocation().empty())
{
std::cout << " Location: " << controller->location << std::endl;
std::cout << " Location: " << controller->GetLocation() << std::endl;
}
/*---------------------------------------------------------*\
| Print device serial |
\*---------------------------------------------------------*/
if(!controller->serial.empty())
if(!controller->GetSerial().empty())
{
std::cout << " Serial: " << controller->serial << std::endl;
std::cout << " Serial: " << controller->GetSerial() << std::endl;
}
/*---------------------------------------------------------*\