diff options
Diffstat (limited to 'plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp')
-rw-r--r-- | plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp b/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp index 252271467d..36693d52b1 100644 --- a/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp +++ b/plugins/CurrencyRates/src/CurrencyRatesProviderCurrencyConverter.cpp @@ -47,15 +47,11 @@ TWatchedRates g_aWatchedRates; INT_PTR CALLBACK OptDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) { - auto get_provider = []()->CCurrencyRatesProviderCurrencyConverter* + auto get_provider = []()->CCurrencyRatesProviderCurrencyConverter* { - auto pProviders = CModuleInfo::GetCurrencyRateProvidersPtr(); - const auto& rapCurrencyRatesProviders = pProviders->GetProviders(); - for (auto i = rapCurrencyRatesProviders.begin(); i != rapCurrencyRatesProviders.end(); ++i) { - const auto& pProvider = *i; - if (auto p = dynamic_cast<CCurrencyRatesProviderCurrencyConverter*>(pProvider.get())) + for (auto &pProvider : g_apProviders) + if (auto p = dynamic_cast<CCurrencyRatesProviderCurrencyConverter*>(pProvider)) return p; - } assert(!"We should never get here!"); return nullptr; |