diff options
author | swarmer <swarmer@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
commit | 317da38588b7898a99fd9168571408123350012b (patch) | |
tree | 25eebc31526019ad39a6c1b13f492963d97ba439 /library/cpp/resource | |
parent | 3b2241461d41d41ba1a706b0750c4f0f55c344f6 (diff) | |
download | ydb-317da38588b7898a99fd9168571408123350012b.tar.gz |
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/resource')
-rw-r--r-- | library/cpp/resource/registry.cpp | 10 | ||||
-rw-r--r-- | library/cpp/resource/registry.h | 12 | ||||
-rw-r--r-- | library/cpp/resource/resource.cpp | 6 | ||||
-rw-r--r-- | library/cpp/resource/resource.h | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp index 66001c4769..c032fd4c05 100644 --- a/library/cpp/resource/registry.cpp +++ b/library/cpp/resource/registry.cpp @@ -21,7 +21,7 @@ namespace { typedef std::pair<TStringBuf, TStringBuf> TDescriptor; struct TStore: public IStore, public THashMap<TStringBuf, TDescriptor*> { - void Store(const TStringBuf key, const TStringBuf data) override { + void Store(const TStringBuf key, const TStringBuf data) override { if (contains(key)) { const TStringBuf value = (*this)[key]->second; if (value != data) { @@ -49,7 +49,7 @@ namespace { Y_VERIFY(size() == Count(), "size mismatch"); } - bool FindExact(const TStringBuf key, TString* out) const override { + bool FindExact(const TStringBuf key, TString* out) const override { if (TDescriptor* const* res = FindPtr(key)) { // temporary // https://st.yandex-team.ru/DEVTOOLS-3985 @@ -68,7 +68,7 @@ namespace { return false; } - void FindMatch(const TStringBuf subkey, IMatch& cb) const override { + void FindMatch(const TStringBuf subkey, IMatch& cb) const override { for (const auto& it : *this) { if (it.first.StartsWith(subkey)) { // temporary @@ -100,11 +100,11 @@ namespace { }; } -TString NResource::Compress(const TStringBuf data) { +TString NResource::Compress(const TStringBuf data) { return GetCodec()->Encode(data); } -TString NResource::Decompress(const TStringBuf data) { +TString NResource::Decompress(const TStringBuf data) { return GetCodec()->Decode(data); } diff --git a/library/cpp/resource/registry.h b/library/cpp/resource/registry.h index fe67702cbc..819966fa31 100644 --- a/library/cpp/resource/registry.h +++ b/library/cpp/resource/registry.h @@ -6,8 +6,8 @@ #include "resource.h" namespace NResource { - TString Compress(const TStringBuf data); - TString Decompress(const TStringBuf data); + TString Compress(const TStringBuf data); + TString Decompress(const TStringBuf data); class IMatch { public: @@ -16,9 +16,9 @@ namespace NResource { class IStore { public: - virtual void Store(const TStringBuf key, const TStringBuf data) = 0; - virtual bool FindExact(const TStringBuf key, TString* out) const = 0; - virtual void FindMatch(const TStringBuf subkey, IMatch& cb) const = 0; + virtual void Store(const TStringBuf key, const TStringBuf data) = 0; + virtual bool FindExact(const TStringBuf key, TString* out) const = 0; + virtual void FindMatch(const TStringBuf subkey, IMatch& cb) const = 0; virtual size_t Count() const noexcept = 0; virtual TStringBuf KeyByIndex(size_t idx) const = 0; virtual ~IStore() { @@ -28,7 +28,7 @@ namespace NResource { IStore* CommonStore(); struct TRegHelper { - inline TRegHelper(const TStringBuf key, const TStringBuf data) { + inline TRegHelper(const TStringBuf key, const TStringBuf data) { CommonStore()->Store(key, data); } }; diff --git a/library/cpp/resource/resource.cpp b/library/cpp/resource/resource.cpp index cc20f847a5..af686951b9 100644 --- a/library/cpp/resource/resource.cpp +++ b/library/cpp/resource/resource.cpp @@ -7,11 +7,11 @@ using namespace NResource; -bool NResource::FindExact(const TStringBuf key, TString* out) { +bool NResource::FindExact(const TStringBuf key, TString* out) { return CommonStore()->FindExact(key, out); } -void NResource::FindMatch(const TStringBuf subkey, TResources* out) { +void NResource::FindMatch(const TStringBuf subkey, TResources* out) { struct TMatch: public IMatch { inline TMatch(TResources* r) : R(r) @@ -30,7 +30,7 @@ void NResource::FindMatch(const TStringBuf subkey, TResources* out) { CommonStore()->FindMatch(subkey, m); } -TString NResource::Find(const TStringBuf key) { +TString NResource::Find(const TStringBuf key) { TString ret; if (FindExact(key, &ret)) { diff --git a/library/cpp/resource/resource.h b/library/cpp/resource/resource.h index 42dd0f1891..7da20bdba7 100644 --- a/library/cpp/resource/resource.h +++ b/library/cpp/resource/resource.h @@ -12,10 +12,10 @@ namespace NResource { typedef TVector<TResource> TResources; - TString Find(const TStringBuf key); - bool FindExact(const TStringBuf key, TString* out); + TString Find(const TStringBuf key); + bool FindExact(const TStringBuf key, TString* out); //perform full scan for now - void FindMatch(const TStringBuf subkey, TResources* out); + void FindMatch(const TStringBuf subkey, TResources* out); size_t Count() noexcept; TStringBuf KeyByIndex(size_t idx); TVector<TStringBuf> ListAllKeys(); |