Skip to content

Commit

Permalink
minor-perf: move ECDS factory acllback (#38347)
Browse files Browse the repository at this point in the history
Commit Message: minor-perf: move ECDS factory
Additional Description:
Minor perf nit, move the ECDS factory callback, instead of copying it.

Risk Level: low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Adi Suissa-Peleg <[email protected]>
  • Loading branch information
adisuissa authored Feb 10, 2025
1 parent 6a69e4e commit 4a113b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/filter/config_discovery_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class DynamicFilterConfigProviderImpl : public DynamicFilterConfigProviderImplBa
Config::ConfigAppliedCb applied_on_all_threads) override {
const absl::StatusOr<FactoryCb> config_or_error = instantiateFilterFactory(message);
RETURN_IF_NOT_OK_REF(config_or_error.status());
update(config_or_error.value(), applied_on_all_threads);
update(std::move(config_or_error.value()), applied_on_all_threads);
return absl::OkStatus();
}

Expand All @@ -121,7 +121,7 @@ class DynamicFilterConfigProviderImpl : public DynamicFilterConfigProviderImplBa
if (default_configuration_) {
auto cb_or_error = instantiateFilterFactory(*default_configuration_);
RETURN_IF_NOT_OK_REF(cb_or_error.status());
cb = cb_or_error.value();
cb = std::move(cb_or_error.value());
}
update(cb, applied_on_all_threads);
return absl::OkStatus();
Expand Down

0 comments on commit 4a113b5

Please sign in to comment.