diff options
| author | s-berdnikov <[email protected]> | 2026-01-28 00:30:35 +0300 |
|---|---|---|
| committer | s-berdnikov <[email protected]> | 2026-01-28 00:55:05 +0300 |
| commit | df0d722aa43c7d4ef0fcd2057b5ad51797cc3069 (patch) | |
| tree | 4e9379ee5125b92167789c2e1adadf23cbdba4e3 /yt/cpp | |
| parent | 9acc3e6d92e7bd213580a26e627d41a1af3c0384 (diff) | |
Normalize `operator.*` spelling in YT and YP
As of the date of this PR, there are 4 different ways to spell parenthesis operator in YT
* `operator.*(args...)` - 1435 occasions
* `operator .* (args...)` - 483 occasions
* `operator.* (args...)` - 75 occasions
* `operator .*(args...)` - 63 occasions
As is apparent from this statistics, the first way is the most popular by far (70% of all matches). Furthermore, it is the most consistent with YT style guide <https://nda.ya.ru/t/YOfm_T4z7Syke2>.
commit_hash:d88f1a8d82c91cfb34d5f4ba472d341fb9ca6b82
Diffstat (limited to 'yt/cpp')
| -rw-r--r-- | yt/cpp/mapreduce/interface/common.cpp | 12 | ||||
| -rw-r--r-- | yt/cpp/mapreduce/interface/common.h | 14 | ||||
| -rw-r--r-- | yt/cpp/mapreduce/tests/yt_unittest_lib/yt_unittest_lib.h | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/yt/cpp/mapreduce/interface/common.cpp b/yt/cpp/mapreduce/interface/common.cpp index 840ec3eda2b..cea5a6a83fc 100644 --- a/yt/cpp/mapreduce/interface/common.cpp +++ b/yt/cpp/mapreduce/interface/common.cpp @@ -47,35 +47,35 @@ TNode TSortColumn::ToNode() const // Below lie backward compatibility methods. //////////////////////////////////////////////////////////////////////////////// -TSortColumn& TSortColumn::operator = (TStringBuf name) +TSortColumn& TSortColumn::operator=(TStringBuf name) { EnsureAscending(); Name_ = name; return *this; } -TSortColumn& TSortColumn::operator = (const TString& name) +TSortColumn& TSortColumn::operator=(const TString& name) { return (*this = static_cast<TStringBuf>(name)); } -TSortColumn& TSortColumn::operator = (const char* name) +TSortColumn& TSortColumn::operator=(const char* name) { return (*this = static_cast<TStringBuf>(name)); } -bool TSortColumn::operator == (TStringBuf rhsName) const +bool TSortColumn::operator==(TStringBuf rhsName) const { EnsureAscending(); return Name_ == rhsName; } -bool TSortColumn::operator == (const TString& rhsName) const +bool TSortColumn::operator==(const TString& rhsName) const { return *this == static_cast<TStringBuf>(rhsName); } -bool TSortColumn::operator == (const char* rhsName) const +bool TSortColumn::operator==(const char* rhsName) const { return *this == static_cast<TStringBuf>(rhsName); } diff --git a/yt/cpp/mapreduce/interface/common.h b/yt/cpp/mapreduce/interface/common.h index b9a274b4e22..ac76ea1076b 100644 --- a/yt/cpp/mapreduce/interface/common.h +++ b/yt/cpp/mapreduce/interface/common.h @@ -520,7 +520,7 @@ public: TNode ToNode() const; /// @brief Comparison is default and checks both name and sort order. - bool operator == (const TSortColumn& rhs) const = default; + bool operator==(const TSortColumn& rhs) const = default; /// /// @{ @@ -530,14 +530,14 @@ public: /// This is backward compatibility methods. /// /// @ref TSortOrder_backward_compatibility - TSortColumn& operator = (TStringBuf name); - TSortColumn& operator = (const TString& name); - TSortColumn& operator = (const char* name); + TSortColumn& operator=(TStringBuf name); + TSortColumn& operator=(const TString& name); + TSortColumn& operator=(const char* name); /// @} - bool operator == (const TStringBuf rhsName) const; - bool operator == (const TString& rhsName) const; - bool operator == (const char* rhsName) const; + bool operator==(const TStringBuf rhsName) const; + bool operator==(const TString& rhsName) const; + bool operator==(const char* rhsName) const; // Intentionally implicit conversions. operator TString() const; diff --git a/yt/cpp/mapreduce/tests/yt_unittest_lib/yt_unittest_lib.h b/yt/cpp/mapreduce/tests/yt_unittest_lib/yt_unittest_lib.h index 9687b45f1ff..46215ed5d0a 100644 --- a/yt/cpp/mapreduce/tests/yt_unittest_lib/yt_unittest_lib.h +++ b/yt/cpp/mapreduce/tests/yt_unittest_lib/yt_unittest_lib.h @@ -98,7 +98,7 @@ struct TOwningYaMRRow operator TYaMRRow() const; }; -bool operator == (const TOwningYaMRRow& row1, const TOwningYaMRRow& row2); +bool operator==(const TOwningYaMRRow& row1, const TOwningYaMRRow& row2); //////////////////////////////////////////////////////////////////////////////// |
