diff options
author | denplusplus <[email protected]> | 2022-02-10 16:47:34 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:34 +0300 |
commit | addb3626ed629a8c7d9c8c30e87365b478a8c266 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/on_disk/chunks/chunked_helpers.cpp | |
parent | 57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/on_disk/chunks/chunked_helpers.cpp')
-rw-r--r-- | library/cpp/on_disk/chunks/chunked_helpers.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/on_disk/chunks/chunked_helpers.cpp b/library/cpp/on_disk/chunks/chunked_helpers.cpp index ad9f918751c..b7adba27535 100644 --- a/library/cpp/on_disk/chunks/chunked_helpers.cpp +++ b/library/cpp/on_disk/chunks/chunked_helpers.cpp @@ -1,21 +1,21 @@ -#include <util/ysaveload.h> - -#include "chunked_helpers.h" - -TBlob GetBlock(const TBlob& blob, size_t index) { - TChunkedDataReader reader(blob); +#include <util/ysaveload.h> + +#include "chunked_helpers.h" + +TBlob GetBlock(const TBlob& blob, size_t index) { + TChunkedDataReader reader(blob); if (index >= reader.GetBlocksCount()) ythrow yexception() << "index " << index << " is >= than block count " << reader.GetBlocksCount(); - size_t begin = (const char*)reader.GetBlock(index) - (const char*)blob.Data(); - return blob.SubBlob(begin, begin + reader.GetBlockLen(index)); -} + size_t begin = (const char*)reader.GetBlock(index) - (const char*)blob.Data(); + return blob.SubBlob(begin, begin + reader.GetBlockLen(index)); +} /*************************** TNamedChunkedDataReader ***************************/ static const char* NamedChunkedDataMagic = "NamedChunkedData"; -TNamedChunkedDataReader::TNamedChunkedDataReader(const TBlob& blob) - : TChunkedDataReader(blob) +TNamedChunkedDataReader::TNamedChunkedDataReader(const TBlob& blob) + : TChunkedDataReader(blob) { if (TChunkedDataReader::GetBlocksCount() < 1) throw yexception() << "Too few blocks"; |