aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkozhevn <dkozhevn@yandex-team.ru>2022-02-10 16:50:12 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:12 +0300
commit6ef3852e01d65430e2c0e50b3e646bd1ea019847 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8
parent683e03b0ce12a7f90545572c6c4a576887e647a9 (diff)
downloadydb-6ef3852e01d65430e2c0e50b3e646bd1ea019847.tar.gz
Restoring authorship annotation for <dkozhevn@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--library/cpp/object_factory/object_factory.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/library/cpp/object_factory/object_factory.h b/library/cpp/object_factory/object_factory.h
index 6bee515a3e..96cc11bcfd 100644
--- a/library/cpp/object_factory/object_factory.h
+++ b/library/cpp/object_factory/object_factory.h
@@ -126,12 +126,12 @@ namespace NObjectFactory {
return result;
}
- static THolder<TProduct> VerifiedConstruct(const TKey& key) {
- auto result = MakeHolder(key);
- Y_VERIFY(result, "Construct by factory failed");
- return result;
- }
-
+ static THolder<TProduct> VerifiedConstruct(const TKey& key) {
+ auto result = MakeHolder(key);
+ Y_VERIFY(result, "Construct by factory failed");
+ return result;
+ }
+
template<class... Args>
static THolder<TProduct> MakeHolder(Args&&... args) {
return THolder<TProduct>(Construct(std::forward<Args>(args)...));
@@ -151,17 +151,17 @@ namespace NObjectFactory {
return keys;
}
- template <class TDerivedProduct>
- static TSet<TKey> GetRegisteredKeys() {
- TSet<TKey> registeredKeys(GetRegisteredKeys());
- TSet<TKey> fileredKeys;
- std::copy_if(registeredKeys.begin(), registeredKeys.end(), std::inserter(fileredKeys, fileredKeys.end()), [](const TKey& key) {
- THolder<TProduct> objectHolder(Construct(key));
- return !!dynamic_cast<const TDerivedProduct*>(objectHolder.Get());
- });
- return fileredKeys;
- }
-
+ template <class TDerivedProduct>
+ static TSet<TKey> GetRegisteredKeys() {
+ TSet<TKey> registeredKeys(GetRegisteredKeys());
+ TSet<TKey> fileredKeys;
+ std::copy_if(registeredKeys.begin(), registeredKeys.end(), std::inserter(fileredKeys, fileredKeys.end()), [](const TKey& key) {
+ THolder<TProduct> objectHolder(Construct(key));
+ return !!dynamic_cast<const TDerivedProduct*>(objectHolder.Get());
+ });
+ return fileredKeys;
+ }
+
template <class Product>
class TRegistrator {
public:
@@ -196,13 +196,13 @@ namespace NObjectFactory {
return Singleton<TParametrizedObjectFactory<TProduct, TKey, TArgs...>>()->Create(key, std::forward<TArgs>(args)...);
}
- template <class... Args>
- static THolder<TProduct> VerifiedConstruct(Args&&... args) {
- auto result = MakeHolder(std::forward<Args>(args)...);
- Y_VERIFY(result, "Construct by factory failed");
- return result;
- }
-
+ template <class... Args>
+ static THolder<TProduct> VerifiedConstruct(Args&&... args) {
+ auto result = MakeHolder(std::forward<Args>(args)...);
+ Y_VERIFY(result, "Construct by factory failed");
+ return result;
+ }
+
template<class... Args>
static THolder<TProduct> MakeHolder(Args&&... args) {
return THolder<TProduct>(Construct(std::forward<Args>(args)...));