diff options
author | divankov <divankov@yandex-team.ru> | 2022-02-10 16:48:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:05 +0300 |
commit | cd88d7933255d8690da34c7b1f7427cf2bb3ae23 (patch) | |
tree | 39e40694c8b41674a17b90f034e31d7cfcf20142 | |
parent | 37a2795395ba606e239b750ff2afb17905274ec4 (diff) | |
download | ydb-cd88d7933255d8690da34c7b1f7427cf2bb3ae23.tar.gz |
Restoring authorship annotation for <divankov@yandex-team.ru>. Commit 1 of 2.
-rw-r--r-- | contrib/libs/jemalloc/spinlock.h | 6 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam_ut.cpp | 4 | ||||
-rw-r--r-- | library/cpp/regex/pcre/regexp.h | 2 | ||||
-rw-r--r-- | library/cpp/string_utils/quote/quote.h | 2 | ||||
-rw-r--r-- | library/cpp/testing/unittest/utmain.cpp | 8 | ||||
-rw-r--r-- | library/cpp/uri/uri_ut.cpp | 4 | ||||
-rw-r--r-- | util/datetime/base.h | 2 | ||||
-rw-r--r-- | util/generic/algorithm.h | 4 | ||||
-rw-r--r-- | util/generic/hash.h | 4 | ||||
-rw-r--r-- | util/generic/intrlist_ut.cpp | 4 | ||||
-rw-r--r-- | util/generic/strbase.h | 4 | ||||
-rw-r--r-- | util/system/nice.cpp | 28 | ||||
-rw-r--r-- | util/system/nice.h | 6 | ||||
-rw-r--r-- | util/system/nice_ut.cpp | 54 | ||||
-rw-r--r-- | util/system/tls.h | 2 |
15 files changed, 67 insertions, 67 deletions
diff --git a/contrib/libs/jemalloc/spinlock.h b/contrib/libs/jemalloc/spinlock.h index 93fcf10e12..26532baebb 100644 --- a/contrib/libs/jemalloc/spinlock.h +++ b/contrib/libs/jemalloc/spinlock.h @@ -1,9 +1,9 @@ #pragma once -#include <util/system/defaults.h> - -typedef volatile intptr_t spinlock_t; +#include <util/system/defaults.h> +typedef volatile intptr_t spinlock_t; + #define SPIN_L AllocAcquireAdaptiveLock #define SPIN_U AllocReleaseAdaptiveLock diff --git a/library/cpp/cgiparam/cgiparam_ut.cpp b/library/cpp/cgiparam/cgiparam_ut.cpp index a562342084..fc13549c8b 100644 --- a/library/cpp/cgiparam/cgiparam_ut.cpp +++ b/library/cpp/cgiparam/cgiparam_ut.cpp @@ -51,7 +51,7 @@ Y_UNIT_TEST_SUITE(TCgiParametersTest) { TCgiParameters c; c.Scan(parsee); - c.InsertUnescaped("d", "xxx"); + c.InsertUnescaped("d", "xxx"); UNIT_ASSERT_VALUES_EQUAL(c.Print(), parsee + "&d=xxx"); } @@ -197,7 +197,7 @@ Y_UNIT_TEST_SUITE(TCgiParametersTest) { Y_UNIT_TEST(TestJoinUnescaped) { TCgiParameters c; - c.Scan("foo=1&foo=2"); + c.Scan("foo=1&foo=2"); c.JoinUnescaped("foo", ';', "0"); UNIT_ASSERT_VALUES_EQUAL(c.Print(), "foo=1;2;0"); diff --git a/library/cpp/regex/pcre/regexp.h b/library/cpp/regex/pcre/regexp.h index bc610bd2f3..91e6836ad0 100644 --- a/library/cpp/regex/pcre/regexp.h +++ b/library/cpp/regex/pcre/regexp.h @@ -18,7 +18,7 @@ class TRegExBaseImpl; class TRegExBase { protected: - TSimpleIntrusivePtr<TRegExBaseImpl> Impl; + TSimpleIntrusivePtr<TRegExBaseImpl> Impl; public: TRegExBase(const char* regExpr = nullptr, int cflags = REG_EXTENDED); diff --git a/library/cpp/string_utils/quote/quote.h b/library/cpp/string_utils/quote/quote.h index 3b7221154e..6b2ade5f84 100644 --- a/library/cpp/string_utils/quote/quote.h +++ b/library/cpp/string_utils/quote/quote.h @@ -32,7 +32,7 @@ char* CGIUnescape(char* to, const char* from); char* CGIUnescape(char* to, const char* from, size_t len); void CGIUnescape(TString& url); TString CGIUnescapeRet(const TStringBuf from); - + inline TStringBuf CgiUnescapeBuf(char* to, const TStringBuf from) { return TStringBuf(to, CGIUnescape(to, from.data(), from.size())); } diff --git a/library/cpp/testing/unittest/utmain.cpp b/library/cpp/testing/unittest/utmain.cpp index 305bc6b40f..7b79bbe102 100644 --- a/library/cpp/testing/unittest/utmain.cpp +++ b/library/cpp/testing/unittest/utmain.cpp @@ -244,7 +244,7 @@ public: inline void SetShowFails(bool show) { ShowFails = show; } - + void SetContinueOnFail(bool val) { NUnitTest::ContinueOnFail = val; } @@ -421,7 +421,7 @@ private: if (ShowFails) { for (size_t i = 0; i < Fails.size(); ++i) { printf("%s", Fails[i].data()); - } + } } } @@ -693,8 +693,8 @@ int NUnitTest::RunMain(int argc, char** argv) { processor.SetPrintBeforeSuite(true); } else if (strcmp(name, "--print-before-test") == 0) { processor.SetPrintBeforeTest(true); - } else if (strcmp(name, "--show-fails") == 0) { - processor.SetShowFails(true); + } else if (strcmp(name, "--show-fails") == 0) { + processor.SetShowFails(true); } else if (strcmp(name, "--dont-show-fails") == 0) { processor.SetShowFails(false); } else if (strcmp(name, "--continue-on-fail") == 0) { diff --git a/library/cpp/uri/uri_ut.cpp b/library/cpp/uri/uri_ut.cpp index 2ebd83fc93..f6d1267aa7 100644 --- a/library/cpp/uri/uri_ut.cpp +++ b/library/cpp/uri/uri_ut.cpp @@ -552,7 +552,7 @@ namespace NUri { URL_TEST(url, test); } } - + Y_UNIT_TEST(test11) { { TTest test = { @@ -568,7 +568,7 @@ namespace NUri { URL_TEST(url, test); } } - + Y_UNIT_TEST(test12) { // test characters which are not always safe { diff --git a/util/datetime/base.h b/util/datetime/base.h index 5e902b8f63..f20ea05bb0 100644 --- a/util/datetime/base.h +++ b/util/datetime/base.h @@ -53,7 +53,7 @@ void sprint_gm_date(char* buf, time_t when, long* sec = nullptr); bool sscan_date(const char* date, struct tm& theTm); const int DATE_8601_LEN = 21; // strlen("YYYY-MM-DDThh:mm:ssZ") = 20 + '\0' - + size_t FormatDate8601(char* buf, size_t len, time_t when); inline void sprint_date8601(char* buf, time_t when) { diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h index badfb88993..54b6033a8c 100644 --- a/util/generic/algorithm.h +++ b/util/generic/algorithm.h @@ -63,7 +63,7 @@ static inline void SortBy(TContainer& container, const TGetKey& getKey) { SortBy(container.begin(), container.end(), getKey); } -template <class T> +template <class T> static inline void StableSort(T f, T l) { std::stable_sort(f, l); } @@ -93,7 +93,7 @@ static inline void StableSortBy(TContainer& container, const TGetKey& getKey) { StableSortBy(container.begin(), container.end(), getKey); } -template <class T> +template <class T> static inline void PartialSort(T f, T m, T l) { std::partial_sort(f, m, l); } diff --git a/util/generic/hash.h b/util/generic/hash.h index e46db21fa9..07632d686d 100644 --- a/util/generic/hash.h +++ b/util/generic/hash.h @@ -743,7 +743,7 @@ public: template <class ForwardIterator> void insert_unique(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag) { difference_type n = std::distance(f, l); - + reserve(num_elements + n); for (; n > 0; --n, ++f) insert_unique_noresize(*f); @@ -752,7 +752,7 @@ public: template <class ForwardIterator> void insert_equal(ForwardIterator f, ForwardIterator l, std::forward_iterator_tag) { difference_type n = std::distance(f, l); - + reserve(num_elements + n); for (; n > 0; --n, ++f) emplace_equal_noresize(*f); diff --git a/util/generic/intrlist_ut.cpp b/util/generic/intrlist_ut.cpp index eff7cdf2ee..4972c03638 100644 --- a/util/generic/intrlist_ut.cpp +++ b/util/generic/intrlist_ut.cpp @@ -246,7 +246,7 @@ static void TestCutFront(int N, int M) { } TMyList::Cut(l.Begin(), it, l2.End()); - CheckIterationAfterCut(l2, l, N, M); + CheckIterationAfterCut(l2, l, N, M); } static void TestCutBack(int N, int M) { @@ -259,7 +259,7 @@ static void TestCutBack(int N, int M) { } TMyList::Cut(it, l.End(), l2.End()); - CheckIterationAfterCut(l, l2, N, M); + CheckIterationAfterCut(l, l2, N, M); } void TListTest::TestCut() { diff --git a/util/generic/strbase.h b/util/generic/strbase.h index ab39fc7537..44a514aa55 100644 --- a/util/generic/strbase.h +++ b/util/generic/strbase.h @@ -343,7 +343,7 @@ public: friend bool operator==(const TCharType* pc, const TSelf& s) noexcept { return equal(pc, s); } - + template <typename TDerived2, typename TTraits2> friend bool operator!=(const TSelf& s1, const TStringBase<TDerived2, TChar, TTraits2>& s2) noexcept { return !(s1 == s2); @@ -366,7 +366,7 @@ public: friend bool operator<(const TSelf& s1, const TStringBase<TDerived2, TChar, TTraits2>& s2) noexcept { return compare(s1, s2) < 0; } - + friend bool operator<(const TSelf& s1, TStringView s2) noexcept { return compare(s1, s2) < 0; } diff --git a/util/system/nice.cpp b/util/system/nice.cpp index 20fe926054..cbab07f688 100644 --- a/util/system/nice.cpp +++ b/util/system/nice.cpp @@ -1,15 +1,15 @@ -#include "nice.h" - -#include "platform.h" - -#if defined(_unix_) +#include "nice.h" + +#include "platform.h" + +#if defined(_unix_) #include <unistd.h> -#endif - -bool Nice(int prioDelta) { -#if defined(_unix_) - return nice(prioDelta) != -1; -#else - return prioDelta == 0; -#endif -} +#endif + +bool Nice(int prioDelta) { +#if defined(_unix_) + return nice(prioDelta) != -1; +#else + return prioDelta == 0; +#endif +} diff --git a/util/system/nice.h b/util/system/nice.h index 86b8bc5f3c..9d2e01331d 100644 --- a/util/system/nice.h +++ b/util/system/nice.h @@ -1,3 +1,3 @@ -#pragma once - -bool Nice(int prioDelta); +#pragma once + +bool Nice(int prioDelta); diff --git a/util/system/nice_ut.cpp b/util/system/nice_ut.cpp index ae0051f285..8650711def 100644 --- a/util/system/nice_ut.cpp +++ b/util/system/nice_ut.cpp @@ -1,42 +1,42 @@ -#include "nice.h" - -#include "platform.h" - +#include "nice.h" + +#include "platform.h" + #include <library/cpp/testing/unittest/registar.h> - -#ifdef _unix_ + +#ifdef _unix_ #include <sys/resource.h> - -static int GetPriority() { - return getpriority(PRIO_PROCESS, 0); -} -#endif - + +static int GetPriority() { + return getpriority(PRIO_PROCESS, 0); +} +#endif + Y_UNIT_TEST_SUITE(NiceTest) { Y_UNIT_TEST(TestNiceZero) { - UNIT_ASSERT(Nice(0)); - UNIT_ASSERT(Nice(0)); - } -#ifdef _unix_ + UNIT_ASSERT(Nice(0)); + UNIT_ASSERT(Nice(0)); + } +#ifdef _unix_ Y_UNIT_TEST(TestNice) { - int prio = GetPriority(); + int prio = GetPriority(); if (prio >= 10) { return; } - if (Nice(-2)) { - UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio - 2); - prio -= 2; - } else { - UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio); - } + if (Nice(-2)) { + UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio - 2); + prio -= 2; + } else { + UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio); + } UNIT_ASSERT(Nice(1)); UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio + 1); - UNIT_ASSERT(Nice(0)); + UNIT_ASSERT(Nice(0)); UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio + 1); UNIT_ASSERT(Nice(2)); UNIT_ASSERT_VALUES_EQUAL(GetPriority(), prio + 3); - } -#endif -} + } +#endif +} diff --git a/util/system/tls.h b/util/system/tls.h index 3c4f56dbeb..589a4effe9 100644 --- a/util/system/tls.h +++ b/util/system/tls.h @@ -235,7 +235,7 @@ namespace NTls { } inline operator const T&() const { - return Get(); + return Get(); } inline operator T&() { |