Moved files [#METR-17973].

This commit is contained in:
Alexey Milovidov 2015-10-05 04:50:42 +03:00
parent 0ddb9cffdd
commit 3183deadef

View File

@ -215,7 +215,7 @@ public:
class AddressPatterns class AddressPatterns
{ {
private: private:
typedef std::vector<SharedPtr<IAddressPattern> > Container; typedef std::vector<std::unique_ptr<IAddressPattern>> Container;
Container patterns; Container patterns;
public: public:
@ -253,15 +253,15 @@ public:
for (Poco::Util::AbstractConfiguration::Keys::const_iterator it = config_keys.begin(); it != config_keys.end(); ++it) for (Poco::Util::AbstractConfiguration::Keys::const_iterator it = config_keys.begin(); it != config_keys.end(); ++it)
{ {
SharedPtr<IAddressPattern> pattern; Container::value_type pattern;
String value = config.getString(config_elem + "." + *it); String value = config.getString(config_elem + "." + *it);
if (0 == it->compare(0, strlen("ip"), "ip")) if (0 == it->compare(0, strlen("ip"), "ip"))
pattern = new IPAddressPattern(value); pattern.reset(new IPAddressPattern(value));
else if (0 == it->compare(0, strlen("host_regexp"), "host_regexp")) else if (0 == it->compare(0, strlen("host_regexp"), "host_regexp"))
pattern = new HostRegexpPattern(value); pattern.reset(new HostRegexpPattern(value));
else if (0 == it->compare(0, strlen("host"), "host")) else if (0 == it->compare(0, strlen("host"), "host"))
pattern = new HostExactPattern(value); pattern.reset(new HostExactPattern(value));
else else
throw Exception("Unknown address pattern type: " + *it, ErrorCodes::UNKNOWN_ADDRESS_PATTERN_TYPE); throw Exception("Unknown address pattern type: " + *it, ErrorCodes::UNKNOWN_ADDRESS_PATTERN_TYPE);