aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/resource
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /library/cpp/resource
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/resource')
-rw-r--r--library/cpp/resource/registry.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp
index 66001c4769..1a52646390 100644
--- a/library/cpp/resource/registry.cpp
+++ b/library/cpp/resource/registry.cpp
@@ -23,23 +23,23 @@ namespace {
struct TStore: public IStore, public THashMap<TStringBuf, TDescriptor*> {
void Store(const TStringBuf key, const TStringBuf data) override {
if (contains(key)) {
- const TStringBuf value = (*this)[key]->second;
- if (value != data) {
- size_t vsize = GetCodec()->DecompressedLength(value);
- size_t dsize = GetCodec()->DecompressedLength(data);
- if (vsize + dsize < 1000) {
- Y_VERIFY(false, "Redefinition of key %s:\n"
- " old value: %s,\n"
- " new value: %s.",
+ const TStringBuf value = (*this)[key]->second;
+ if (value != data) {
+ size_t vsize = GetCodec()->DecompressedLength(value);
+ size_t dsize = GetCodec()->DecompressedLength(data);
+ if (vsize + dsize < 1000) {
+ Y_VERIFY(false, "Redefinition of key %s:\n"
+ " old value: %s,\n"
+ " new value: %s.",
TString{key}.Quote().c_str(),
- Decompress(value).Quote().c_str(),
- Decompress(data).Quote().c_str());
- } else {
- Y_VERIFY(false, "Redefinition of key %s,"
+ Decompress(value).Quote().c_str(),
+ Decompress(data).Quote().c_str());
+ } else {
+ Y_VERIFY(false, "Redefinition of key %s,"
" old size: %zu,"
" new size: %zu.",
TString{key}.Quote().c_str(), vsize, dsize);
- }
+ }
}
} else {
D_.push_back(TDescriptor(key, data));