aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorpyos <pyos@yandex-team.ru>2022-02-10 16:47:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:49 +0300
commitef985e41af0868676d7a2275f1d90261253ddf3b (patch)
tree3a6a11d19d8c39c7b90c132bce7e1c3536be37c1 /util
parent8387f1fb70a4161b7581d3c0da52c4810df655be (diff)
downloadydb-ef985e41af0868676d7a2275f1d90261253ddf3b.tar.gz
Restoring authorship annotation for <pyos@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/folder/path.cpp4
-rw-r--r--util/folder/path.h2
-rw-r--r--util/folder/path_ut.cpp20
-rw-r--r--util/random/common_ops.h14
-rw-r--r--util/system/context.cpp10
-rw-r--r--util/system/context_aarch64.h2
-rw-r--r--util/system/context_i686.h4
-rw-r--r--util/system/context_x86.h2
-rw-r--r--util/system/context_x86_64.h2
9 files changed, 30 insertions, 30 deletions
diff --git a/util/folder/path.cpp b/util/folder/path.cpp
index bfe0c67d68..6aa49eab88 100644
--- a/util/folder/path.cpp
+++ b/util/folder/path.cpp
@@ -311,12 +311,12 @@ void TFsPath::Touch() const {
// XXX: move implementation to util/somewhere.
TFsPath TFsPath::RealPath() const {
CheckDefined();
- return ::RealPath(*this);
+ return ::RealPath(*this);
}
TFsPath TFsPath::RealLocation() const {
CheckDefined();
- return ::RealLocation(*this);
+ return ::RealLocation(*this);
}
TFsPath TFsPath::ReadLink() const {
diff --git a/util/folder/path.h b/util/folder/path.h
index 2fb4d6b4ef..5de67c1597 100644
--- a/util/folder/path.h
+++ b/util/folder/path.h
@@ -208,7 +208,7 @@ private:
private:
TString Path_;
- /// cache
+ /// cache
mutable TSimpleIntrusivePtr<TSplit> Split_;
};
diff --git a/util/folder/path_ut.cpp b/util/folder/path_ut.cpp
index e6a3451016..984a9333b0 100644
--- a/util/folder/path_ut.cpp
+++ b/util/folder/path_ut.cpp
@@ -175,17 +175,17 @@ Y_UNIT_TEST_SUITE(TFsPathTests) {
#ifndef _win_
Y_UNIT_TEST(TestRealPath) {
UNIT_ASSERT(TFsPath(".").RealPath().IsDirectory());
-
- TTestDirectory td("TestRealPath");
- TFsPath link = td.Child("link");
- TFsPath target1 = td.Child("target1");
- target1.Touch();
- TFsPath target2 = td.Child("target2");
- target2.Touch();
- UNIT_ASSERT(NFs::SymLink(target1.RealPath(), link.GetPath()));
+
+ TTestDirectory td("TestRealPath");
+ TFsPath link = td.Child("link");
+ TFsPath target1 = td.Child("target1");
+ target1.Touch();
+ TFsPath target2 = td.Child("target2");
+ target2.Touch();
+ UNIT_ASSERT(NFs::SymLink(target1.RealPath(), link.GetPath()));
UNIT_ASSERT_VALUES_EQUAL(link.RealPath(), target1.RealPath());
- UNIT_ASSERT(NFs::Remove(link.GetPath()));
- UNIT_ASSERT(NFs::SymLink(target2.RealPath(), link.GetPath()));
+ UNIT_ASSERT(NFs::Remove(link.GetPath()));
+ UNIT_ASSERT(NFs::SymLink(target2.RealPath(), link.GetPath()));
UNIT_ASSERT_VALUES_EQUAL(link.RealPath(), target2.RealPath()); // must not cache old value
}
#endif
diff --git a/util/random/common_ops.h b/util/random/common_ops.h
index 602eede351..ea8199fa34 100644
--- a/util/random/common_ops.h
+++ b/util/random/common_ops.h
@@ -5,31 +5,31 @@
namespace NPrivate {
constexpr double ToRandReal1(const ui32 x) noexcept {
- return x * (double)(1.0 / 4294967295.0);
+ return x * (double)(1.0 / 4294967295.0);
}
constexpr double ToRandReal2(const ui32 x) noexcept {
- return x * (double)(1.0 / 4294967296.0);
+ return x * (double)(1.0 / 4294967296.0);
}
constexpr double ToRandReal3(const ui32 x) noexcept {
- return ((double)x + 0.5) * (double)(1.0 / 4294967296.0);
+ return ((double)x + 0.5) * (double)(1.0 / 4294967296.0);
}
constexpr double ToRandReal1(const ui64 x) noexcept {
- return (x >> 11) * (double)(1.0 / 9007199254740991.0);
+ return (x >> 11) * (double)(1.0 / 9007199254740991.0);
}
constexpr double ToRandReal2(const ui64 x) noexcept {
- return (x >> 11) * (double)(1.0 / 9007199254740992.0);
+ return (x >> 11) * (double)(1.0 / 9007199254740992.0);
}
constexpr double ToRandReal3(const ui64 x) noexcept {
- return ((x >> 12) + 0.5) * (double)(1.0 / 4503599627370496.0);
+ return ((x >> 12) + 0.5) * (double)(1.0 / 4503599627370496.0);
}
constexpr double ToRandReal4(const ui64 x) noexcept {
- return double(x * (double)(1.0 / 18446744073709551616.0L));
+ return double(x * (double)(1.0 / 18446744073709551616.0L));
}
template <class T>
diff --git a/util/system/context.cpp b/util/system/context.cpp
index ad99309088..bea1976a1e 100644
--- a/util/system/context.cpp
+++ b/util/system/context.cpp
@@ -110,10 +110,10 @@ namespace {
return JmpBufReg(buf, PROGR_CNT);
}
- static inline void*& JmpBufFrameReg(__myjmp_buf& buf) noexcept {
- return JmpBufReg(buf, FRAME_CNT);
- }
-
+ static inline void*& JmpBufFrameReg(__myjmp_buf& buf) noexcept {
+ return JmpBufReg(buf, FRAME_CNT);
+ }
+
#if defined(_x86_64_)
// not sure if Y_NO_SANITIZE is needed
Y_NO_SANITIZE("address")
@@ -191,7 +191,7 @@ TContMachineContext::TContMachineContext(const TContClosure& c)
JmpBufProgrReg(Buf_) = reinterpret_cast<void*>(ContextTrampoLine);
JmpBufStackReg(Buf_) = stack.StackPtr();
- JmpBufFrameReg(Buf_) = nullptr;
+ JmpBufFrameReg(Buf_) = nullptr;
}
void TContMachineContext::SwitchTo(TContMachineContext* next) noexcept {
diff --git a/util/system/context_aarch64.h b/util/system/context_aarch64.h
index 589521d8ae..1a69e63e7d 100644
--- a/util/system/context_aarch64.h
+++ b/util/system/context_aarch64.h
@@ -2,7 +2,7 @@
typedef unsigned long __myjmp_buf[22];
-#define FRAME_CNT 10
+#define FRAME_CNT 10
#define PROGR_CNT 11
#define STACK_CNT 13
#define EXTRA_PUSH_ARGS 2
diff --git a/util/system/context_i686.h b/util/system/context_i686.h
index 1abfd5dada..d1437ff477 100644
--- a/util/system/context_i686.h
+++ b/util/system/context_i686.h
@@ -1,9 +1,9 @@
#pragma once
-#define MJB_BP 3
+#define MJB_BP 3
#define MJB_SP 4
#define MJB_PC 5
-#define MJB_RBP MJB_BP
+#define MJB_RBP MJB_BP
#define MJB_RSP MJB_SP
typedef int __myjmp_buf[6];
diff --git a/util/system/context_x86.h b/util/system/context_x86.h
index 6ea066ff88..83509a4f5c 100644
--- a/util/system/context_x86.h
+++ b/util/system/context_x86.h
@@ -8,5 +8,5 @@
#define PROGR_CNT MJB_PC
#define STACK_CNT MJB_RSP
-#define FRAME_CNT MJB_RBP
+#define FRAME_CNT MJB_RBP
#define EXTRA_PUSH_ARGS 1
diff --git a/util/system/context_x86_64.h b/util/system/context_x86_64.h
index 94e4f37eb3..90022d0498 100644
--- a/util/system/context_x86_64.h
+++ b/util/system/context_x86_64.h
@@ -1,6 +1,6 @@
#pragma once
-#define MJB_RBP 1
+#define MJB_RBP 1
#define MJB_RSP 6
#define MJB_PC 7