aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/resource/registry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/cpp/resource/registry.cpp')
-rw-r--r--library/cpp/resource/registry.cpp6
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);
+}