GeckoCodeConfig: Amend unnecessary string literals to char literals
Also gets rid of an unnecessary std::string construction in a loop. std::string already has an operator+ overload to prepend characters.
This commit is contained in:
parent
28235b5cb6
commit
0d0e9f626d
|
@ -114,7 +114,7 @@ static void SaveGeckoCode(std::vector<std::string>& lines, std::vector<std::stri
|
||||||
const GeckoCode& gcode)
|
const GeckoCode& gcode)
|
||||||
{
|
{
|
||||||
if (gcode.enabled)
|
if (gcode.enabled)
|
||||||
enabledLines.push_back("$" + gcode.name);
|
enabledLines.push_back('$' + gcode.name);
|
||||||
|
|
||||||
if (!gcode.user_defined)
|
if (!gcode.user_defined)
|
||||||
return;
|
return;
|
||||||
|
@ -129,7 +129,7 @@ static void SaveGeckoCode(std::vector<std::string>& lines, std::vector<std::stri
|
||||||
|
|
||||||
// save the notes
|
// save the notes
|
||||||
for (const std::string& note : gcode.notes)
|
for (const std::string& note : gcode.notes)
|
||||||
lines.push_back(std::string("*") + note);
|
lines.push_back('*' + note);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
|
void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
|
||||||
|
|
Loading…
Reference in New Issue