mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-10 02:37:04 +00:00
build: clear 3 warnings - lambda captures that are not required (#15596)
config_substitution_rule is a const enum with a constant initializer, so a
lambda can read it without capturing it. Capturing it explicitly is what
-Wunused-lambda-capture reports.
The category was taken to zero by #15417 and merged on 2026-09-02. These
three sites arrived on 2026-09-08 in bcb4f17d9a, "fix(cli): resolve inherited
presets through vendor manifests" (#15438). All three lambdas still read the
value, which needs no capture and is unchanged.
This commit is contained in:
@@ -1975,7 +1975,7 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
|
||||
std::unique_ptr<PresetBundle> cli_preset_bundle;
|
||||
auto ensure_cli_preset_bundle = [&cli_preset_bundle, config_substitution_rule](std::string &error) -> PresetBundle * {
|
||||
auto ensure_cli_preset_bundle = [&cli_preset_bundle](std::string &error) -> PresetBundle * {
|
||||
if (cli_preset_bundle)
|
||||
return cli_preset_bundle.get();
|
||||
try {
|
||||
@@ -2002,7 +2002,7 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
};
|
||||
|
||||
auto resolve_preset = [&ensure_cli_preset_bundle, config_substitution_rule](const std::string &file, DynamicPrintConfig &config,
|
||||
auto resolve_preset = [&ensure_cli_preset_bundle](const std::string &file, DynamicPrintConfig &config,
|
||||
std::string &config_type, const std::string &config_from,
|
||||
bool probe_type, std::string &error) {
|
||||
const auto *inherits = config.option<ConfigOptionString>(BBL_JSON_KEY_INHERITS);
|
||||
@@ -2046,7 +2046,7 @@ int CLI::run(int argc, char **argv)
|
||||
error, allow_source_manifest);
|
||||
};
|
||||
|
||||
auto load_config_file = [config_substitution_rule, &resolve_preset](const std::string& file, DynamicPrintConfig& config, std::string& config_type,
|
||||
auto load_config_file = [&resolve_preset](const std::string& file, DynamicPrintConfig& config, std::string& config_type,
|
||||
std::string& config_name, std::string& filament_id, std::string& config_from) {
|
||||
if (! boost::filesystem::exists(file)) {
|
||||
boost::nowide::cerr << __FUNCTION__<< ": can not find setting file: " << file << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user