diff options
author | cobat <cobat@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | e486e109b08823b61996f2154f0bc6b7c27a4af4 (patch) | |
tree | cb98553f871fe96452fd02bd46a1a4e0cf165844 /library/cpp/resource | |
parent | 85e7b8b43a12f69b4721aee71dea28491c9bd503 (diff) | |
download | ydb-e486e109b08823b61996f2154f0bc6b7c27a4af4.tar.gz |
Restoring authorship annotation for <cobat@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/resource')
-rw-r--r-- | library/cpp/resource/README.md | 46 | ||||
-rw-r--r-- | library/cpp/resource/registry.cpp | 2 |
2 files changed, 24 insertions, 24 deletions
diff --git a/library/cpp/resource/README.md b/library/cpp/resource/README.md index b1e4961c1f..1353d57cb1 100644 --- a/library/cpp/resource/README.md +++ b/library/cpp/resource/README.md @@ -1,24 +1,24 @@ -This library provides implementation to access a resource (data, file, image, etc.) by a key. -============================================================================================= - -See ya make documentation, resources section for more details. - -### Example - adding a resource file into build: -``` -LIBRARY() -OWNER(user1) -RESOURCE( - path/to/file1 /key/in/program/1 - path/to/file2 /key2 -) -END() -``` - -### Example - access to a file content by a key: -```cpp +This library provides implementation to access a resource (data, file, image, etc.) by a key. +============================================================================================= + +See ya make documentation, resources section for more details. + +### Example - adding a resource file into build: +``` +LIBRARY() +OWNER(user1) +RESOURCE( + path/to/file1 /key/in/program/1 + path/to/file2 /key2 +) +END() +``` + +### Example - access to a file content by a key: +```cpp #include <library/cpp/resource/resource.h> -int main() { - Cout << NResource::Find("/key/in/program/1") << Endl; - Cout << NResource::Find("/key2") << Endl; -} -``` +int main() { + Cout << NResource::Find("/key/in/program/1") << Endl; + Cout << NResource::Find("/key2") << Endl; +} +``` diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp index 66001c4769..e116f003dd 100644 --- a/library/cpp/resource/registry.cpp +++ b/library/cpp/resource/registry.cpp @@ -46,7 +46,7 @@ namespace { (*this)[key] = &D_.back(); } - Y_VERIFY(size() == Count(), "size mismatch"); + Y_VERIFY(size() == Count(), "size mismatch"); } bool FindExact(const TStringBuf key, TString* out) const override { |