Fix variable name comment and message (#10302)

As you can see, it's checkin the local variable
`custom_gcode_placeholders` which comes from
`custom_gcode_specific_placeholders()` which is:

```
const std::map<t_custom_gcode_key, t_config_option_keys>& custom_gcode_specific_placeholders()
{
    return s_CustomGcodeSpecificPlaceholders;
}
```

not s_CustomGcodeSpecificOptions
This commit is contained in:
coryrc 2025-09-19 10:41:25 -04:00 committed by GitHub
parent c3521b4d25
commit 94cc5465f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2955,16 +2955,16 @@ std::string GCode::placeholder_parser_process(const std::string &name, const std
if (config_override) {
const auto& custom_gcode_placeholders = custom_gcode_specific_placeholders();
// 1-st check: custom G-code "name" have to be present in s_CustomGcodeSpecificOptions;
// 1-st check: custom G-code "name" have to be present in s_CustomGcodeSpecificPlaceholders;
//if (custom_gcode_placeholders.count(name) > 0) {
// const auto& placeholders = custom_gcode_placeholders.at(name);
if (auto it = custom_gcode_placeholders.find(name); it != custom_gcode_placeholders.end()) {
const auto& placeholders = it->second;
for (const std::string& key : config_override->keys()) {
// 2-nd check: "key" have to be present in s_CustomGcodeSpecificOptions for "name" custom G-code ;
// 2-nd check: "key" have to be present in s_CustomGcodeSpecificPlaceholders for "name" custom G-code ;
if (std::find(placeholders.begin(), placeholders.end(), key) == placeholders.end()) {
auto& vector = m_placeholder_error_messages[name + " - option not specified for custom gcode type (s_CustomGcodeSpecificOptions)"];
auto& vector = m_placeholder_error_messages[name + " - option not specified for custom gcode type (s_CustomGcodeSpecificPlaceholders)"];
if (std::find(vector.begin(), vector.end(), key) == vector.end())
vector.emplace_back(key);
}
@ -2977,7 +2977,7 @@ std::string GCode::placeholder_parser_process(const std::string &name, const std
}
}
else {
auto& vector = m_placeholder_error_messages[name + " - gcode type not found in s_CustomGcodeSpecificOptions"];
auto& vector = m_placeholder_error_messages[name + " - gcode type not found in s_CustomGcodeSpecificPlaceholders"];
if (vector.empty())
vector.emplace_back("");
}