summaryrefslogtreecommitdiffstats
path: root/util/system/filemap.h
diff options
context:
space:
mode:
authordenplusplus <[email protected]>2022-02-10 16:47:34 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:34 +0300
commit57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (patch)
treecc63639f8e502db19a82c20e2861c6d1edbf9fea /util/system/filemap.h
parent464ba3814a83db4f2d5327393b0b6eaf0c86bfd7 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system/filemap.h')
-rw-r--r--util/system/filemap.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/system/filemap.h b/util/system/filemap.h
index 11be64bff47..2d99051a115 100644
--- a/util/system/filemap.h
+++ b/util/system/filemap.h
@@ -49,13 +49,13 @@ struct TMemoryMapCommon {
};
enum EOpenModeFlag {
- oRdOnly = 1,
- oRdWr = 2,
+ oRdOnly = 1,
+ oRdWr = 2,
oCopyOnWr = 4,
oAccessMask = 7,
- oNotGreedy = 8,
- oPrecharge = 16,
+ oNotGreedy = 8,
+ oPrecharge = 16,
oPopulate = 32, // Populate page table entries (see mmap's MAP_POPULATE)
};
Y_DECLARE_FLAGS(EOpenMode, EOpenModeFlag)
@@ -115,7 +115,7 @@ public:
TFileMap(FILE* f, EOpenMode om = oRdOnly, TString dbgName = UnknownFileName());
TFileMap(const TFile& file, EOpenMode om = oRdOnly, TString dbgName = UnknownFileName());
TFileMap(const TFileMap& fm) noexcept;
-
+
~TFileMap();
TMapResult Map(i64 offset, size_t size);
@@ -145,7 +145,7 @@ public:
inline bool IsOpen() const noexcept {
return Map_.IsOpen();
}
-
+
inline bool IsWritable() const noexcept {
return Map_.IsWritable();
}
@@ -157,7 +157,7 @@ public:
inline void* Ptr() const noexcept {
return Region_.MappedData();
}
-
+
inline size_t MappedSize() const noexcept {
return Region_.MappedSize();
}
@@ -232,7 +232,7 @@ public:
size_t Size() const {
return Size_;
}
- const T& GetAt(size_t pos) const {
+ const T& GetAt(size_t pos) const {
if (pos < Size_)
return Ptr_[pos];
return Dummy();
@@ -258,7 +258,7 @@ public:
Y_PURE_FUNCTION bool Empty() const noexcept {
return 0 == Size_;
- }
+ }
/// for STL compatibility only, Begin() usage is recommended
const T* begin() const noexcept {
return Begin();