@@ -1080,10 +1080,10 @@ static std::string prettify_de_name(const std::string_view de_name)
1080
1080
return de_name.data ();
1081
1081
}
1082
1082
1083
- std::vector<std:: uint16_t > queried_gpus;
1084
- std::vector<std::string> queried_disks;
1085
- std::vector<std::string> queried_themes_names;
1086
- systemInfo_t queried_themes;
1083
+ systemInfo_t queried_gpus;
1084
+ systemInfo_t queried_disks;
1085
+ systemInfo_t queried_themes_names;
1086
+ systemInfo_t queried_themes;
1087
1087
1088
1088
// clang-format on
1089
1089
void addValueFromModuleMember (const std::string& moduleName, const std::string& moduleMemberName, parse_args_t & parse_args)
@@ -1251,7 +1251,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1251
1251
1252
1252
else if (moduleName == " theme" )
1253
1253
{
1254
- Query::Theme query_theme (queried_themes, config, false );
1254
+ Query::Theme query_theme (config, false );
1255
1255
1256
1256
if (sysInfo.find (moduleName) == sysInfo.end ())
1257
1257
sysInfo.insert ({ moduleName, {} });
@@ -1281,7 +1281,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1281
1281
{
1282
1282
if (hasStart (moduleMemberName, " cursor" ))
1283
1283
{
1284
- Query::Theme query_cursor (queried_themes, config, true );
1284
+ Query::Theme query_cursor (config, true );
1285
1285
switch (moduleMember_hash)
1286
1286
{
1287
1287
case " cursor" _fnv1a16:
@@ -1296,7 +1296,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1296
1296
}
1297
1297
else
1298
1298
{
1299
- Query::Theme query_theme (0 , queried_themes, queried_themes_names, " gsettings" , config, true );
1299
+ Query::Theme query_theme (0 , queried_themes, " gsettings" , config, true );
1300
1300
switch (moduleMember_hash)
1301
1301
{
1302
1302
case " name" _fnv1a16: SYSINFO_INSERT (query_theme.gtk_theme ()); break ;
@@ -1310,9 +1310,9 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1310
1310
// clang-format off
1311
1311
else if (moduleName == " theme-gtk-all" )
1312
1312
{
1313
- Query::Theme gtk2 (2 , queried_themes, queried_themes_names, " gtk2" , config);
1314
- Query::Theme gtk3 (3 , queried_themes, queried_themes_names, " gtk3" , config);
1315
- Query::Theme gtk4 (4 , queried_themes, queried_themes_names, " gtk4" , config);
1313
+ Query::Theme gtk2 (2 , queried_themes, " gtk2" , config);
1314
+ Query::Theme gtk3 (3 , queried_themes, " gtk3" , config);
1315
+ Query::Theme gtk4 (4 , queried_themes, " gtk4" , config);
1316
1316
1317
1317
if (sysInfo.find (moduleName) == sysInfo.end ())
1318
1318
sysInfo.insert ({ moduleName, {} });
@@ -1338,7 +1338,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1338
1338
" Syntax should be like 'theme_gtkN' which N stands for the version of gtk to query (single number)" ,
1339
1339
moduleName);
1340
1340
1341
- Query::Theme query_theme (ver, queried_themes, queried_themes_names, fmt::format (" gtk{}" , ver), config);
1341
+ Query::Theme query_theme (ver, queried_themes, fmt::format (" gtk{}" , ver), config);
1342
1342
1343
1343
if (sysInfo.find (moduleName) == sysInfo.end ())
1344
1344
sysInfo.insert ({ moduleName, {} });
@@ -1387,8 +1387,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1387
1387
1388
1388
else if (hasStart (moduleName, " gpu" ))
1389
1389
{
1390
- const std::uint16_t id =
1391
- static_cast <std::uint16_t >(moduleName.length () > 3 ? std::stoi (std::string (moduleName).substr (3 )) : 0 );
1390
+ const std::string& id = moduleName.length () > 3 ? moduleName.substr (3 ) : " 0" ;
1392
1391
1393
1392
Query::GPU query_gpu (id, queried_gpus);
1394
1393
@@ -1417,7 +1416,7 @@ void addValueFromModuleMember(const std::string& moduleName, const std::string&
1417
1416
TOTAL,
1418
1417
FREE
1419
1418
};
1420
- std::string path = moduleName.data ();
1419
+ std::string path{ moduleName.data ()} ;
1421
1420
path.erase (0 , 5 ); // disk(
1422
1421
path.pop_back (); // )
1423
1422
debug (" disk path = {}" , path);
@@ -1652,8 +1651,7 @@ void addValueFromModule(const std::string& moduleName, parse_args_t& parse_args)
1652
1651
1653
1652
else if (hasStart (moduleName, " gpu" ))
1654
1653
{
1655
- const std::uint16_t id =
1656
- static_cast <std::uint16_t >(moduleName.length () > 3 ? std::stoi (std::string (moduleName).substr (3 )) : 0 );
1654
+ const std::string& id = (moduleName.length () > 3 ? moduleName.substr (3 ) : " 0" );
1657
1655
1658
1656
if (sysInfo.find (moduleName) == sysInfo.end ())
1659
1657
sysInfo.insert ({ moduleName, {} });
0 commit comments