diff options
author | sobols <sobols@yandex-team.ru> | 2022-02-10 16:47:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:08 +0300 |
commit | 03335cb18337a0ef51966452a66a69b01abea218 (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /contrib/libs/yaml-cpp/src/setting.h | |
parent | 09961b69c61f471ddd594e0fd877df62a8021562 (diff) | |
download | ydb-03335cb18337a0ef51966452a66a69b01abea218.tar.gz |
Restoring authorship annotation for <sobols@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/yaml-cpp/src/setting.h')
-rw-r--r-- | contrib/libs/yaml-cpp/src/setting.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/libs/yaml-cpp/src/setting.h b/contrib/libs/yaml-cpp/src/setting.h index 0f8e19fbc62..b78d40e2e85 100644 --- a/contrib/libs/yaml-cpp/src/setting.h +++ b/contrib/libs/yaml-cpp/src/setting.h @@ -20,7 +20,7 @@ class Setting { Setting() : m_value() {} const T get() const { return m_value; } - std::unique_ptr<SettingChangeBase> set(const T& value); + std::unique_ptr<SettingChangeBase> set(const T& value); void restore(const Setting<T>& oldSetting) { m_value = oldSetting.get(); } private: @@ -49,8 +49,8 @@ class SettingChange : public SettingChangeBase { }; template <typename T> -inline std::unique_ptr<SettingChangeBase> Setting<T>::set(const T& value) { - std::unique_ptr<SettingChangeBase> pChange(new SettingChange<T>(this)); +inline std::unique_ptr<SettingChangeBase> Setting<T>::set(const T& value) { + std::unique_ptr<SettingChangeBase> pChange(new SettingChange<T>(this)); m_value = value; return pChange; } @@ -71,23 +71,23 @@ class SettingChanges : private noncopyable { (*it)->pop(); } - void push(std::unique_ptr<SettingChangeBase> pSettingChange) { - m_settingChanges.push_back(std::move(pSettingChange)); + void push(std::unique_ptr<SettingChangeBase> pSettingChange) { + m_settingChanges.push_back(std::move(pSettingChange)); } - // like std::unique_ptr - assignment is transfer of ownership - SettingChanges& operator=(SettingChanges&& rhs) { + // like std::unique_ptr - assignment is transfer of ownership + SettingChanges& operator=(SettingChanges&& rhs) { if (this == &rhs) return *this; clear(); - std::swap(m_settingChanges, rhs.m_settingChanges); - + std::swap(m_settingChanges, rhs.m_settingChanges); + return *this; } private: - typedef std::vector<std::unique_ptr<SettingChangeBase>> setting_changes; + typedef std::vector<std::unique_ptr<SettingChangeBase>> setting_changes; setting_changes m_settingChanges; }; } |