diff options
author | Egor Kochetov <gluk47@gmail.com> | 2022-02-10 16:50:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:36 +0300 |
commit | a1fb24cd1409be21002b3f8d291c3f6cfc113e68 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/file.cpp | |
parent | 40896b241c91572ea1369526ee1e6ae0ba340f34 (diff) | |
download | ydb-a1fb24cd1409be21002b3f8d291c3f6cfc113e68.tar.gz |
Restoring authorship annotation for Egor Kochetov <gluk47@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/file.cpp')
-rw-r--r-- | util/system/file.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/system/file.cpp b/util/system/file.cpp index 7092c6c32f..4a261d020c 100644 --- a/util/system/file.cpp +++ b/util/system/file.cpp @@ -58,15 +58,15 @@ #define HAVE_SYNC_FILE_RANGE 0 #endif -static bool IsStupidFlagCombination(EOpenMode oMode) { - // ForAppend will actually not be applied in the following combinations: +static bool IsStupidFlagCombination(EOpenMode oMode) { + // ForAppend will actually not be applied in the following combinations: return (oMode & (CreateAlways | ForAppend)) == (CreateAlways | ForAppend) || (oMode & (TruncExisting | ForAppend)) == (TruncExisting | ForAppend) || (oMode & (CreateNew | ForAppend)) == (CreateNew | ForAppend); -} - +} + TFileHandle::TFileHandle(const TString& fName, EOpenMode oMode) noexcept { ui32 fcMode = 0; EOpenMode createMode = oMode & MaskCreation; - Y_VERIFY(!IsStupidFlagCombination(oMode), "oMode %d makes no sense", static_cast<int>(oMode)); + Y_VERIFY(!IsStupidFlagCombination(oMode), "oMode %d makes no sense", static_cast<int>(oMode)); if (!(oMode & MaskRW)) { oMode |= RdWr; } |