aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated
diff options
context:
space:
mode:
authormelkov <melkov@yandex-team.ru>2022-02-10 16:48:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:13 +0300
commit438546c8737d5c1fdeb31157dcf999717d930eec (patch)
treed29d229abd2f9f889b9b7eb148d635059dc26acf /library/cpp/deprecated
parent96647fad5355ff5ef45a00a6d85c097028584ab0 (diff)
downloadydb-438546c8737d5c1fdeb31157dcf999717d930eec.tar.gz
Restoring authorship annotation for <melkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated')
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.cpp4
-rw-r--r--library/cpp/deprecated/mapped_file/mapped_file.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.cpp b/library/cpp/deprecated/mapped_file/mapped_file.cpp
index b0e4511299b..10032d8aab0 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.cpp
+++ b/library/cpp/deprecated/mapped_file/mapped_file.cpp
@@ -25,8 +25,8 @@ void TMappedFile::precharge(size_t off, size_t size) const {
return;
Map_->Precharge(off, size);
-}
-
+}
+
void TMappedFile::init(const TString& name) {
THolder<TFileMap> map(new TFileMap(name));
TMappedFile newFile(map.Get(), name.data());
diff --git a/library/cpp/deprecated/mapped_file/mapped_file.h b/library/cpp/deprecated/mapped_file/mapped_file.h
index 45859ed65a0..32bd169c57e 100644
--- a/library/cpp/deprecated/mapped_file/mapped_file.h
+++ b/library/cpp/deprecated/mapped_file/mapped_file.h
@@ -25,11 +25,11 @@ public:
TMappedFile() {
Map_ = nullptr;
}
-
+
~TMappedFile() {
term();
}
-
+
explicit TMappedFile(const TString& name) {
Map_ = nullptr;
init(name, TFileMap::oRdOnly);
@@ -54,16 +54,16 @@ public:
Map_ = nullptr;
}
}
-
+
size_t getSize() const {
return (Map_ ? Map_->MappedSize() : 0);
}
-
+
void* getData(size_t pos = 0) const {
Y_ASSERT(!Map_ || (pos <= getSize()));
return (Map_ ? (void*)((unsigned char*)Map_->Ptr() + pos) : nullptr);
}
-
+
void precharge(size_t pos = 0, size_t size = (size_t)-1) const;
void swap(TMappedFile& file) noexcept {