aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authornsofya <nsofya@yandex-team.ru>2022-02-10 16:49:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:52 +0300
commit2ea6d2c7415473747379b1c65468241b431057ad (patch)
tree667f873e5a94ca0042984be80442f34aac887f7d /library/cpp
parentedee5b99e1eec042f46725b89dcd81ea7e41d663 (diff)
downloadydb-2ea6d2c7415473747379b1c65468241b431057ad.tar.gz
Restoring authorship annotation for <nsofya@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/json/writer/json_value.cpp4
-rw-r--r--library/cpp/logger/global/global.h2
-rw-r--r--library/cpp/logger/ya.make4
-rw-r--r--library/cpp/malloc/api/malloc.h4
-rw-r--r--library/cpp/object_factory/object_factory.h14
-rw-r--r--library/cpp/streams/lz/lz.cpp20
-rw-r--r--library/cpp/testing/common/env.h4
-rw-r--r--library/cpp/testing/unittest/gtest.cpp4
-rw-r--r--library/cpp/testing/unittest/simple.h62
-rw-r--r--library/cpp/testing/unittest/tests_data.cpp2
-rw-r--r--library/cpp/testing/unittest/tests_data.h8
11 files changed, 64 insertions, 64 deletions
diff --git a/library/cpp/json/writer/json_value.cpp b/library/cpp/json/writer/json_value.cpp
index c61e8d1dc4..41835e1528 100644
--- a/library/cpp/json/writer/json_value.cpp
+++ b/library/cpp/json/writer/json_value.cpp
@@ -257,13 +257,13 @@ namespace NJson {
BackChecks();
return Value.Array->back();
}
-
+
TJsonValue& TJsonValue::AppendValue(const TJsonValue& value) {
SetType(JSON_ARRAY);
Value.Array->push_back(value);
return Value.Array->back();
}
-
+
TJsonValue& TJsonValue::AppendValue(TJsonValue&& value) {
SetType(JSON_ARRAY);
Value.Array->push_back(std::move(value));
diff --git a/library/cpp/logger/global/global.h b/library/cpp/logger/global/global.h
index cbe71b16ea..3ec7422eb3 100644
--- a/library/cpp/logger/global/global.h
+++ b/library/cpp/logger/global/global.h
@@ -71,7 +71,7 @@ public:
#define RESOURCES_LOG SINGLETON_CHECKED_GENERIC_LOG(TGlobalLog, TRTYLogPreprocessor, TLOG_RESOURCES, "RESOURCES")
#define TEMPLATE_LOG(logLevel) SINGLETON_CHECKED_GENERIC_LOG(TGlobalLog, TRTYLogPreprocessor, logLevel, ToString(logLevel).data())
-
+
#define IS_LOG_ACTIVE(logLevel) (TLoggerOperator<TGlobalLog>::Log().FiltrationLevel() >= logLevel)
#define RTY_MEM_LOG(Action) \
diff --git a/library/cpp/logger/ya.make b/library/cpp/logger/ya.make
index 00a5263cba..e295a5dd02 100644
--- a/library/cpp/logger/ya.make
+++ b/library/cpp/logger/ya.make
@@ -7,8 +7,8 @@ OWNER(
LIBRARY()
-GENERATE_ENUM_SERIALIZATION(priority.h)
-
+GENERATE_ENUM_SERIALIZATION(priority.h)
+
PEERDIR (
library/cpp/json
)
diff --git a/library/cpp/malloc/api/malloc.h b/library/cpp/malloc/api/malloc.h
index ebd545d6dd..00466e5627 100644
--- a/library/cpp/malloc/api/malloc.h
+++ b/library/cpp/malloc/api/malloc.h
@@ -1,8 +1,8 @@
#pragma once
-#include <string.h>
+#include <string.h>
#include <util/system/compiler.h>
-
+
namespace NMalloc {
struct TMallocInfo {
TMallocInfo();
diff --git a/library/cpp/object_factory/object_factory.h b/library/cpp/object_factory/object_factory.h
index 96cc11bcfd..a25e342d10 100644
--- a/library/cpp/object_factory/object_factory.h
+++ b/library/cpp/object_factory/object_factory.h
@@ -113,7 +113,7 @@ namespace NObjectFactory {
return keysStr;
}
- static TProduct* Construct(const TKey& key, const TKey& defKey) {
+ static TProduct* Construct(const TKey& key, const TKey& defKey) {
TProduct* result = Singleton<TObjectFactory<TProduct, TKey>>()->Create(key);
if (!result && !!defKey) {
result = Singleton<TObjectFactory<TProduct, TKey>>()->Create(defKey);
@@ -121,11 +121,11 @@ namespace NObjectFactory {
return result;
}
- static TProduct* Construct(const TKey& key) {
- TProduct* result = Singleton<TObjectFactory<TProduct, TKey>>()->Create(key);
- return result;
- }
-
+ static TProduct* Construct(const TKey& key) {
+ TProduct* result = Singleton<TObjectFactory<TProduct, TKey>>()->Create(key);
+ return result;
+ }
+
static THolder<TProduct> VerifiedConstruct(const TKey& key) {
auto result = MakeHolder(key);
Y_VERIFY(result, "Construct by factory failed");
@@ -141,7 +141,7 @@ namespace NObjectFactory {
return Singleton<TObjectFactory<TProduct, TKey>>()->HasImpl(key);
}
- static void GetRegisteredKeys(TSet<TKey>& keys) {
+ static void GetRegisteredKeys(TSet<TKey>& keys) {
return Singleton<TObjectFactory<TProduct, TKey>>()->GetKeys(keys);
}
diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp
index b65bb3ed96..2053e1a4f7 100644
--- a/library/cpp/streams/lz/lz.cpp
+++ b/library/cpp/streams/lz/lz.cpp
@@ -120,16 +120,16 @@ private:
this->Save(compressed, &header);
using TPart = IOutputStream::TPart;
- if (ptr) {
- const TPart parts[] = {
- TPart(tmp, sizeof(tmp)),
- TPart(ptr, len),
- };
-
- Slave_->Write(parts, sizeof(parts) / sizeof(*parts));
- } else {
- Slave_->Write(tmp, sizeof(tmp));
- }
+ if (ptr) {
+ const TPart parts[] = {
+ TPart(tmp, sizeof(tmp)),
+ TPart(ptr, len),
+ };
+
+ Slave_->Write(parts, sizeof(parts) / sizeof(*parts));
+ } else {
+ Slave_->Write(tmp, sizeof(tmp));
+ }
}
private:
diff --git a/library/cpp/testing/common/env.h b/library/cpp/testing/common/env.h
index 7b89aa1bed..5d54558367 100644
--- a/library/cpp/testing/common/env.h
+++ b/library/cpp/testing/common/env.h
@@ -2,14 +2,14 @@
#include <unordered_map>
-#include <util/folder/path.h>
+#include <util/folder/path.h>
#include <util/generic/string.h>
#include <util/generic/strbuf.h>
#include <util/system/src_location.h>
// @brief return full path to arcadia root
TString ArcadiaSourceRoot();
-
+
// @brief return full path for file or folder specified by known source location `where` and `path` which is relative to parent folder of `where`
// for the instance: there is 2 files in folder test example_ut.cpp and example.data, so full path to test/example.data can be obtained
// from example_ut.cpp as ArcadiaFromCurrentLocation(__SOURCE_FILE__, "example.data")
diff --git a/library/cpp/testing/unittest/gtest.cpp b/library/cpp/testing/unittest/gtest.cpp
index ebad1ea4d6..8c83ae6287 100644
--- a/library/cpp/testing/unittest/gtest.cpp
+++ b/library/cpp/testing/unittest/gtest.cpp
@@ -1,5 +1,5 @@
#include "gtest.h"
-#include "simple.h"
+#include "simple.h"
#include <util/generic/map.h>
#include <util/generic/vector.h>
@@ -12,7 +12,7 @@ IGTestFactory::~IGTestFactory() {
}
namespace {
- struct TCurrentTest: public TSimpleTestExecutor {
+ struct TCurrentTest: public TSimpleTestExecutor {
inline TCurrentTest(TStringBuf name)
: MyName(name)
{
diff --git a/library/cpp/testing/unittest/simple.h b/library/cpp/testing/unittest/simple.h
index 2a5300d886..c7d143be99 100644
--- a/library/cpp/testing/unittest/simple.h
+++ b/library/cpp/testing/unittest/simple.h
@@ -1,39 +1,39 @@
-#pragma once
-
-#include "registar.h"
-
-namespace NUnitTest {
- struct TSimpleTestExecutor: public TTestBase {
+#pragma once
+
+#include "registar.h"
+
+namespace NUnitTest {
+ struct TSimpleTestExecutor: public TTestBase {
typedef TVector<TBaseTestCase> TTests;
-
- TTests Tests;
-
- virtual void Execute() override final {
- AtStart();
-
- for (typename TTests::iterator i = Tests.begin(), ie = Tests.end(); i != ie; ++i) {
+
+ TTests Tests;
+
+ virtual void Execute() override final {
+ AtStart();
+
+ for (typename TTests::iterator i = Tests.begin(), ie = Tests.end(); i != ie; ++i) {
if (!CheckAccessTest(i->Name_)) {
- continue;
- }
+ continue;
+ }
TTestContext context(this->Processor());
- try {
+ try {
BeforeTest(i->Name_);
- {
- TCleanUp cleaner(this);
+ {
+ TCleanUp cleaner(this);
TTestBase::Run([i, &context] { i->Body_(context); }, Name(), i->Name_, i->ForceFork_);
- }
- } catch (const ::NUnitTest::TAssertException&) {
- } catch (const yexception& e) {
+ }
+ } catch (const ::NUnitTest::TAssertException&) {
+ } catch (const yexception& e) {
CATCH_REACTION_BT(i->Name_, e, &context);
- } catch (const std::exception& e) {
+ } catch (const std::exception& e) {
CATCH_REACTION(i->Name_, e, &context);
- } catch (...) {
- AddError("non-std exception!", &context);
- }
+ } catch (...) {
+ AddError("non-std exception!", &context);
+ }
Finish(i->Name_, &context);
- }
-
- AtEnd();
- }
- };
-}
+ }
+
+ AtEnd();
+ }
+ };
+}
diff --git a/library/cpp/testing/unittest/tests_data.cpp b/library/cpp/testing/unittest/tests_data.cpp
index b51cbc4b87..9cf94d98a0 100644
--- a/library/cpp/testing/unittest/tests_data.cpp
+++ b/library/cpp/testing/unittest/tests_data.cpp
@@ -93,7 +93,7 @@ ui16 TPortManager::GetUdpPort(ui16 port) {
ui16 TPortManager::GetTcpAndUdpPort(ui16 port) {
return Impl_->GetTcpAndUdpPort(port);
}
-
+
ui16 TPortManager::GetPortsRange(const ui16 startPort, const ui16 range) {
return Impl_->GetPortsRange(startPort, range);
}
diff --git a/library/cpp/testing/unittest/tests_data.h b/library/cpp/testing/unittest/tests_data.h
index 6536bc1ae6..43d9d66513 100644
--- a/library/cpp/testing/unittest/tests_data.h
+++ b/library/cpp/testing/unittest/tests_data.h
@@ -7,8 +7,8 @@
#include <util/generic/string.h>
#include <util/network/sock.h>
-class TInet6StreamSocket;
-
+class TInet6StreamSocket;
+
// set two options: SO_REUSEADDR and SO_REUSEPORT, both are required for
// correct implementation of TPortManager because of different operating systems
// incompatibility: singe SO_REUSEADDR is enough for Linux, but not enough for Darwin
@@ -34,7 +34,7 @@ public:
// Gets free TCP port
ui16 GetPort(ui16 port = 0);
-
+
// Gets free TCP port
ui16 GetTcpPort(ui16 port = 0);
@@ -49,6 +49,6 @@ public:
private:
class TPortManagerImpl;
THolder<TPortManagerImpl> Impl_;
-};
+};
ui16 GetRandomPort();