aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhr0nix <hr0nix@yandex-team.ru>2022-02-10 16:49:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:59 +0300
commitba105fe2a44ef4553a9c1dabc9c632702a59c965 (patch)
tree5a1c2910a8fdb90aafc4c0eba551a437e57385b1
parent042dfdfd1388209ce3aa06dca56bd52ec63d40b2 (diff)
downloadydb-ba105fe2a44ef4553a9c1dabc9c632702a59c965.tar.gz
Restoring authorship annotation for <hr0nix@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/getopt/small/modchooser.cpp28
-rw-r--r--library/cpp/getopt/small/modchooser.h30
-rw-r--r--library/cpp/svnversion/svnversion.cpp8
-rw-r--r--util/draft/matrix.h2
-rw-r--r--util/generic/algorithm.h36
5 files changed, 52 insertions, 52 deletions
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp
index 2fa5cfd070..5a4bbea034 100644
--- a/library/cpp/getopt/small/modchooser.cpp
+++ b/library/cpp/getopt/small/modchooser.cpp
@@ -69,15 +69,15 @@ TModChooser::TMode::TMode(const TString& name, TMainClass* main, const TString&
{
}
-TModChooser::TModChooser()
+TModChooser::TModChooser()
: ModesHelpOption("-?") // Default help option in last_getopt
, VersionHandler(nullptr)
, ShowSeparated(true)
, SvnRevisionOptionDisabled(false)
, PrintShortCommandInUsage(false)
-{
-}
-
+{
+}
+
TModChooser::~TModChooser() = default;
void TModChooser::AddMode(const TString& mode, const TMainFunctionRawPtr func, const TString& description, bool hidden, bool noCompletion) {
@@ -133,13 +133,13 @@ void TModChooser::SetDescription(const TString& descr) {
}
void TModChooser::SetModesHelpOption(const TString& helpOption) {
- ModesHelpOption = helpOption;
-}
-
-void TModChooser::SetVersionHandler(TVersionHandlerPtr handler) {
- VersionHandler = handler;
-}
-
+ ModesHelpOption = helpOption;
+}
+
+void TModChooser::SetVersionHandler(TVersionHandlerPtr handler) {
+ VersionHandler = handler;
+}
+
void TModChooser::SetSeparatedMode(bool separated) {
ShowSeparated = separated;
}
@@ -185,9 +185,9 @@ int TModChooser::Run(const int argc, const char** argv) const {
return 0;
}
if (VersionHandler && (modeName == "-v" || modeName == "--version")) {
- VersionHandler();
- return 0;
- }
+ VersionHandler();
+ return 0;
+ }
if (!SvnRevisionOptionDisabled && modeName == "--svnrevision") {
NLastGetopt::PrintVersionAndExit(nullptr);
}
diff --git a/library/cpp/getopt/small/modchooser.h b/library/cpp/getopt/small/modchooser.h
index 0a8de6d50b..db323f47ef 100644
--- a/library/cpp/getopt/small/modchooser.h
+++ b/library/cpp/getopt/small/modchooser.h
@@ -30,9 +30,9 @@ public:
virtual ~TMainClass() = default;
};
-//! Function to handle '--version' parameter
-typedef void (*TVersionHandlerPtr)();
-
+//! Function to handle '--version' parameter
+typedef void (*TVersionHandlerPtr)();
+
/*! Main class for handling different modes in single tool.
*
* You can add modes for this class, use autogenerated help with
@@ -43,7 +43,7 @@ typedef void (*TVersionHandlerPtr)();
*/
class TModChooser {
public:
- TModChooser();
+ TModChooser();
~TModChooser();
public:
@@ -67,10 +67,10 @@ public:
//! Set modes help option name (-? is by default)
void SetModesHelpOption(const TString& helpOption);
-
- //! Specify handler for '--version' parameter
- void SetVersionHandler(TVersionHandlerPtr handler);
-
+
+ //! Specify handler for '--version' parameter
+ void SetVersionHandler(TVersionHandlerPtr handler);
+
//! Set description show mode
void SetSeparatedMode(bool separated = true);
@@ -89,9 +89,9 @@ public:
* In this method following things happen:
* 1) If first argument is -h/--help/-? then print short description of
* all modes and exit with zero code.
- * 2) If first argument is -v/--version and version handler is specified,
+ * 2) If first argument is -v/--version and version handler is specified,
* then call it and exit with zero code.
- * 3) Find mode with the same name as first argument. If it's found then
+ * 3) Find mode with the same name as first argument. If it's found then
* call it and return its return code.
* 4) If appropriate mode is not found - return non-zero code.
*/
@@ -138,19 +138,19 @@ private:
//! Main program description.
TString Description;
- //! Help option for modes.
+ //! Help option for modes.
TString ModesHelpOption;
-
+
//! Wrappers around all modes.
TVector<THolder<TMainClass>> Wrappers;
//! Modes
TMap<TString, TMode*> Modes;
-
+
TString DefaultMode;
- //! Handler for '--version' parameter
- TVersionHandlerPtr VersionHandler;
+ //! Handler for '--version' parameter
+ TVersionHandlerPtr VersionHandler;
//! When set to true, show descriptions unsorted and display separators
bool ShowSeparated;
diff --git a/library/cpp/svnversion/svnversion.cpp b/library/cpp/svnversion/svnversion.cpp
index 4c9761fa75..4e244c8129 100644
--- a/library/cpp/svnversion/svnversion.cpp
+++ b/library/cpp/svnversion/svnversion.cpp
@@ -7,10 +7,10 @@
#include <util/generic/strbuf.h>
-extern "C" void PrintProgramSvnVersion() {
- puts(GetProgramSvnVersion());
-}
-
+extern "C" void PrintProgramSvnVersion() {
+ puts(GetProgramSvnVersion());
+}
+
extern "C" void PrintSvnVersionAndExit0() {
PrintProgramSvnVersion();
exit(0);
diff --git a/util/draft/matrix.h b/util/draft/matrix.h
index 154d00b35e..e4729007e5 100644
--- a/util/draft/matrix.h
+++ b/util/draft/matrix.h
@@ -1,7 +1,7 @@
#pragma once
#include <util/generic/noncopyable.h>
-#include <util/system/yassert.h>
+#include <util/system/yassert.h>
#include <util/system/defaults.h>
#include <string.h>
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h
index badfb88993..ade741b32c 100644
--- a/util/generic/algorithm.h
+++ b/util/generic/algorithm.h
@@ -437,7 +437,7 @@ template <class I, class T>
static inline void Fill(I f, I l, const T& v) {
std::fill(f, l, v);
}
-
+
template <typename I, typename S, typename T>
static inline I FillN(I f, S n, const T& v) {
return std::fill_n(f, n, v);
@@ -446,12 +446,12 @@ static inline I FillN(I f, S n, const T& v) {
template <class T>
static inline void Reverse(T f, T l) {
std::reverse(f, l);
-}
-
+}
+
template <class T>
static inline void Rotate(T f, T m, T l) {
std::rotate(f, m, l);
-}
+}
template <typename It, typename Val>
Val Accumulate(It begin, It end, Val val) {
@@ -464,7 +464,7 @@ Val Accumulate(It begin, It end, Val val, BinOp binOp) {
// std::move since C++20
return std::accumulate(begin, end, std::move(val), binOp);
}
-
+
template <typename C, typename Val>
Val Accumulate(const C& c, Val val) {
// std::move since C++20
@@ -498,25 +498,25 @@ static inline typename TVectorType::value_type InnerProduct(const TVectorType& l
}
template <class T>
-static inline T MinElement(T begin, T end) {
+static inline T MinElement(T begin, T end) {
return std::min_element(begin, end);
-}
-
+}
+
template <class T, class C>
-static inline T MinElement(T begin, T end, C comp) {
+static inline T MinElement(T begin, T end, C comp) {
return std::min_element(begin, end, comp);
-}
-
+}
+
template <class T>
-static inline T MaxElement(T begin, T end) {
+static inline T MaxElement(T begin, T end) {
return std::max_element(begin, end);
-}
-
+}
+
template <class T, class C>
-static inline T MaxElement(T begin, T end, C comp) {
+static inline T MaxElement(T begin, T end, C comp) {
return std::max_element(begin, end, comp);
-}
-
+}
+
template <class I, class F>
I MaxElementBy(I begin, I end, F&& func) {
using TValue = decltype(func(*begin));
@@ -558,7 +558,7 @@ void ApplyToMany(TOp op, TArgs&&... args) {
template <class TI, class TOp>
inline void ForEach(TI f, TI l, TOp op) {
std::for_each(f, l, op);
-}
+}
namespace NPrivate {
template <class T, class TOp, size_t... Is>