Addition to prev. revision [#METR-17973].

This commit is contained in:
Alexey Milovidov 2015-10-05 04:40:00 +03:00
parent 918422ad48
commit 0ddb9cffdd
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ class Quotas
{
private:
/// Имя квоты -> квоты.
typedef std::unordered_map<String, SharedPtr<Quota> > Container;
typedef std::unordered_map<String, std::unique_ptr<Quota>> Container;
Container cont;
public:

View File

@ -293,7 +293,7 @@ void Quotas::loadFromConfig(Poco::Util::AbstractConfiguration & config)
for (Poco::Util::AbstractConfiguration::Keys::const_iterator it = config_keys.begin(); it != config_keys.end(); ++it)
{
if (!cont[*it])
cont[*it] = new Quota();
cont[*it].reset(new Quota());
cont[*it]->loadFromConfig("quotas." + *it, *it, config, rng);
}
}