diff options
author | AlexSm <alex@ydb.tech> | 2024-02-16 11:51:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 11:51:30 +0100 |
commit | 506ecaee93b52cc12c2e2f97c3d42e3ca2a7f59e (patch) | |
tree | d096fb9eb988fbb0ca1ba970041773207ce3aa70 /library/cpp/resource/registry.cpp | |
parent | 4749b9e5d260714490997e6f5ee1ee8c1c8fc46c (diff) | |
parent | f200f72c9d7a89c1018e3dc6b46c49fe2ecf84fb (diff) | |
download | ydb-506ecaee93b52cc12c2e2f97c3d42e3ca2a7f59e.tar.gz |
Merge pull request #1940 from dcherednik/importlib
Library import 14
Diffstat (limited to 'library/cpp/resource/registry.cpp')
-rw-r--r-- | library/cpp/resource/registry.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp index c5d6543c65..e403ba8ede 100644 --- a/library/cpp/resource/registry.cpp +++ b/library/cpp/resource/registry.cpp @@ -20,7 +20,7 @@ namespace { typedef std::pair<TStringBuf, TStringBuf> TDescriptor; - struct TStore: public IStore, public THashMap<TStringBuf, TDescriptor*> { + struct TStore final: public IStore, public THashMap<TStringBuf, TDescriptor*> { void Store(const TStringBuf key, const TStringBuf data) override { if (contains(key)) { const TStringBuf value = (*this)[key]->second; @@ -115,3 +115,7 @@ TString NResource::Decompress(const TStringBuf data) { IStore* NResource::CommonStore() { return SingletonWithPriority<TStore, 0>(); } + +NResource::TRegHelper::TRegHelper(const TStringBuf key, const TStringBuf data) { + CommonStore()->Store(key, data); +} |