Просмотр исходного кода

Restoring authorship annotation for <dimanne@yandex-team.ru>. Commit 1 of 2.

dimanne 3 лет назад
Родитель
Сommit
93d66104be

+ 1 - 1
library/cpp/actors/core/events.h

@@ -19,7 +19,7 @@ namespace NActors {
             ES_MON = 7,
             ES_MON = 7,
             ES_INTERCONNECT_TCP = 8,
             ES_INTERCONNECT_TCP = 8,
             ES_PROFILER = 9,
             ES_PROFILER = 9,
-            ES_YF = 10,
+            ES_YF = 10, 
             ES_HTTP = 11,
             ES_HTTP = 11,
 
 
             ES_USERSPACE = 4096,
             ES_USERSPACE = 4096,

+ 1 - 1
library/cpp/actors/core/log.cpp

@@ -695,7 +695,7 @@ namespace NActors {
             } while (!isOk);
             } while (!isOk);
         }
         }
 
 
-        void ReopenLog() override {
+        void ReopenLog() override { 
         }
         }
 
 
     private:
     private:

+ 10 - 10
library/cpp/actors/core/log.h

@@ -32,22 +32,22 @@
              0ull)                                                                               \
              0ull)                                                                               \
     )
     )
 
 
-#define LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, ...)                                               \
-    do {                                                                                                                       \
-        ::NActors::NLog::TSettings* mSettings = static_cast<::NActors::NLog::TSettings*>((actorCtxOrSystem).LoggerSettings()); \
-        ::NActors::NLog::EPriority mPriority = static_cast<::NActors::NLog::EPriority>(priority);                              \
-        ::NActors::NLog::EComponent mComponent = static_cast<::NActors::NLog::EComponent>(component);                          \
-        if (mSettings && mSettings->Satisfies(mPriority, mComponent, sampleBy)) {                                              \
-            ::NActors::MemLogAdapter(                                                                                          \
-                actorCtxOrSystem, priority, component, __VA_ARGS__);                                                           \
-        }                                                                                                                      \
+#define LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, ...)                                               \ 
+    do {                                                                                                                       \ 
+        ::NActors::NLog::TSettings* mSettings = static_cast<::NActors::NLog::TSettings*>((actorCtxOrSystem).LoggerSettings()); \ 
+        ::NActors::NLog::EPriority mPriority = static_cast<::NActors::NLog::EPriority>(priority);                              \ 
+        ::NActors::NLog::EComponent mComponent = static_cast<::NActors::NLog::EComponent>(component);                          \ 
+        if (mSettings && mSettings->Satisfies(mPriority, mComponent, sampleBy)) {                                              \ 
+            ::NActors::MemLogAdapter(                                                                                          \ 
+                actorCtxOrSystem, priority, component, __VA_ARGS__);                                                           \ 
+        }                                                                                                                      \ 
     } while (0) /**/
     } while (0) /**/
 
 
 #define LOG_LOG_S_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, stream)  \
 #define LOG_LOG_S_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, stream)  \
     LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, "%s", [&]() { \
     LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, sampleBy, "%s", [&]() { \
         TStringBuilder logStringBuilder;                                               \
         TStringBuilder logStringBuilder;                                               \
         logStringBuilder << stream;                                                    \
         logStringBuilder << stream;                                                    \
-        return static_cast<TString>(logStringBuilder);                                 \
+        return static_cast<TString>(logStringBuilder);                                 \ 
     }().data())
     }().data())
 
 
 #define LOG_LOG(actorCtxOrSystem, priority, component, ...) LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, 0ull, __VA_ARGS__)
 #define LOG_LOG(actorCtxOrSystem, priority, component, ...) LOG_LOG_SAMPLED_BY(actorCtxOrSystem, priority, component, 0ull, __VA_ARGS__)

+ 1 - 1
library/cpp/actors/dnscachelib/dnscache.h

@@ -55,7 +55,7 @@ private:
     struct THost {
     struct THost {
         THost() noexcept {
         THost() noexcept {
         }
         }
-
+ 
         TVector<TIpHost> AddrsV4;
         TVector<TIpHost> AddrsV4;
         time_t ResolvedV4 = 0;
         time_t ResolvedV4 = 0;
         time_t NotFoundV4 = 0;
         time_t NotFoundV4 = 0;

+ 13 - 13
library/cpp/actors/dnscachelib/ya.make

@@ -1,5 +1,5 @@
-LIBRARY()
-
+LIBRARY() 
+ 
 OWNER(
 OWNER(
     davenger
     davenger
     fomichev
     fomichev
@@ -8,17 +8,17 @@ OWNER(
     single
     single
 )
 )
 
 
-SRCS(
-    dnscache.cpp
-    dnscache.h
+SRCS( 
+    dnscache.cpp 
+    dnscache.h 
     probes.cpp
     probes.cpp
     probes.h
     probes.h
-    timekeeper.h
-)
-
-PEERDIR(
-    contrib/libs/c-ares
+    timekeeper.h 
+) 
+ 
+PEERDIR( 
+    contrib/libs/c-ares 
     library/cpp/lwtrace
     library/cpp/lwtrace
-)
-
-END()
+) 
+ 
+END() 

+ 7 - 7
library/cpp/containers/comptrie/comptrie_builder.inl

@@ -142,7 +142,7 @@ public:
         const_iterator Find(char ch) const;
         const_iterator Find(char ch) const;
         void Add(const TBlob& s, TNode* node);
         void Add(const TBlob& s, TNode* node);
 
 
-        bool IsLast() const override {
+        bool IsLast() const override { 
             return this->Empty();
             return this->Empty();
         }
         }
 
 
@@ -151,7 +151,7 @@ public:
             return Find(key, value, result, packer);
             return Find(key, value, result, packer);
         }
         }
 
 
-        ui64 Measure(const TBuilderImpl* builder) const override {
+        ui64 Measure(const TBuilderImpl* builder) const override { 
             return MeasureRange(builder, 0, this->size());
             return MeasureRange(builder, 0, this->size());
         }
         }
 
 
@@ -200,7 +200,7 @@ public:
             return written;
             return written;
         }
         }
 
 
-        void Destroy(TBuilderImpl* builder) override {
+        void Destroy(TBuilderImpl* builder) override { 
             // Delete all nodes down the stream.
             // Delete all nodes down the stream.
             for (iterator it = this->begin(); it != this->end(); ++it) {
             for (iterator it = this->begin(); it != this->end(); ++it) {
                 builder->DestroyNode(it->Node);
                 builder->DestroyNode(it->Node);
@@ -221,7 +221,7 @@ public:
             Y_ASSERT(reinterpret_cast<ISubtree*>(this) == static_cast<void*>(this)); // This assumption is used in TNode::Subtree()
             Y_ASSERT(reinterpret_cast<ISubtree*>(this) == static_cast<void*>(this)); // This assumption is used in TNode::Subtree()
         }
         }
 
 
-        bool IsLast() const override {
+        bool IsLast() const override { 
             return Buffer.Empty();
             return Buffer.Empty();
         }
         }
 
 
@@ -251,7 +251,7 @@ public:
             return nullptr;
             return nullptr;
         }
         }
 
 
-        ui64 Measure(const TBuilderImpl*) const override {
+        ui64 Measure(const TBuilderImpl*) const override { 
             return Buffer.Size();
             return Buffer.Size();
         }
         }
 
 
@@ -287,7 +287,7 @@ public:
             Y_ASSERT(reinterpret_cast<ISubtree*>(this) == static_cast<void*>(this)); // This assumption is used in TNode::Subtree()
             Y_ASSERT(reinterpret_cast<ISubtree*>(this) == static_cast<void*>(this)); // This assumption is used in TNode::Subtree()
         }
         }
 
 
-        bool IsLast() const override {
+        bool IsLast() const override { 
             return Data->Size == 0;
             return Data->Size == 0;
         }
         }
 
 
@@ -316,7 +316,7 @@ public:
             return nullptr;
             return nullptr;
         }
         }
 
 
-        ui64 Measure(const TBuilderImpl*) const override {
+        ui64 Measure(const TBuilderImpl*) const override { 
             return Data->Size;
             return Data->Size;
         }
         }
 
 

+ 1 - 1
library/cpp/http/fetch/exthttpcodes.h

@@ -45,7 +45,7 @@ enum ExtHttpCodes {
     HTTP_PROXY_ERROR = 1036,
     HTTP_PROXY_ERROR = 1036,
     HTTP_SSL_ERROR = 1037,
     HTTP_SSL_ERROR = 1037,
     HTTP_CACHED_COPY_NOT_FOUND = 1038,
     HTTP_CACHED_COPY_NOT_FOUND = 1038,
-    HTTP_TIMEDOUT_WHILE_BYTES_RECEIVING = 1039,
+    HTTP_TIMEDOUT_WHILE_BYTES_RECEIVING = 1039, 
     HTTP_FETCHER_BAD_RESPONSE = 1040,
     HTTP_FETCHER_BAD_RESPONSE = 1040,
     HTTP_FETCHER_MB_ERROR = 1041,
     HTTP_FETCHER_MB_ERROR = 1041,
     HTTP_SSL_CERT_ERROR = 1042,
     HTTP_SSL_CERT_ERROR = 1042,

+ 16 - 16
library/cpp/http/fetch/httpfetcher.h

@@ -96,12 +96,12 @@ public:
             if ((got = TAgent::read(bufptr, buffree)) < 0) {
             if ((got = TAgent::read(bufptr, buffree)) < 0) {
                 fetcherr = errno;
                 fetcherr = errno;
                 if (errno == EINTR)
                 if (errno == EINTR)
-                    header->error = HTTP_INTERRUPTED;
+                    header->error = HTTP_INTERRUPTED; 
                 else if (errno == ETIMEDOUT)
                 else if (errno == ETIMEDOUT)
-                    header->error = HTTP_TIMEDOUT_WHILE_BYTES_RECEIVING;
-                else
-                    header->error = HTTP_CONNECTION_LOST;
-
+                    header->error = HTTP_TIMEDOUT_WHILE_BYTES_RECEIVING; 
+                else 
+                    header->error = HTTP_CONNECTION_LOST; 
+ 
                 break;
                 break;
             }
             }
 
 
@@ -111,7 +111,7 @@ public:
             buffree -= got;
             buffree -= got;
 
 
             THttpParser<TCheck>::Parse(parsebuf, got);
             THttpParser<TCheck>::Parse(parsebuf, got);
-
+ 
             if (header->error)
             if (header->error)
                 break; //if ANY error ocurred we will stop download that file or will have unprognosed stream position until MAX size reached
                 break; //if ANY error ocurred we will stop download that file or will have unprognosed stream position until MAX size reached
 
 
@@ -139,20 +139,20 @@ public:
             }
             }
         } while (THttpParser<TCheck>::GetState() > THttpParser<TCheck>::hp_eof);
         } while (THttpParser<TCheck>::GetState() > THttpParser<TCheck>::hp_eof);
 
 
-        i64 Adjustment = 0;
-        if (!header->error) {
+        i64 Adjustment = 0; 
+        if (!header->error) { 
             if (header->transfer_chunked) {
             if (header->transfer_chunked) {
-                Adjustment = header->header_size + header->entity_size - bufsize - 1;
+                Adjustment = header->header_size + header->entity_size - bufsize - 1; 
             } else if (header->content_length >= 0) {
             } else if (header->content_length >= 0) {
-                Adjustment = header->header_size + header->content_length - bufsize;
-            }
+                Adjustment = header->header_size + header->content_length - bufsize; 
+            } 
             if (Adjustment > 0)
             if (Adjustment > 0)
-                Adjustment = 0;
-        }
-
+                Adjustment = 0; 
+        } 
+ 
         if (buf) {
         if (buf) {
-            TAlloc::Shrink(buf, buflen - buffree + Adjustment);
-
+            TAlloc::Shrink(buf, buflen - buffree + Adjustment); 
+ 
             if (TWriter::Write(buf, buflen - buffree) < 0)
             if (TWriter::Write(buf, buflen - buffree) < 0)
                 ret = EIO;
                 ret = EIO;
         }
         }

+ 4 - 4
library/cpp/http/fetch/httpparser.h

@@ -174,10 +174,10 @@ protected:
 
 
                 case hp_read_alive:
                 case hp_read_alive:
                     Header->entity_size += size;
                     Header->entity_size += size;
-                    if (Header->entity_size >= Header->content_length) {
+                    if (Header->entity_size >= Header->content_length) { 
                         State = hp_eof;
                         State = hp_eof;
                     }
                     }
-
+ 
                     TCheck::CheckDocPart(buf, size, Header);
                     TCheck::CheckDocPart(buf, size, Header);
                     if (isReader)
                     if (isReader)
                         return size;
                         return size;
@@ -314,8 +314,8 @@ public:
             buf = Ptr;
             buf = Ptr;
             Ptr = (char*)Ptr + Chunk;
             Ptr = (char*)Ptr + Chunk;
             Size -= Chunk;
             Size -= Chunk;
-            if (State == hp_eof) {
-                Size = 0;
+            if (State == hp_eof) { 
+                Size = 0; 
                 Eoferr = 0;
                 Eoferr = 0;
             } else if (State == hp_error)
             } else if (State == hp_error)
                 return Eoferr = -1;
                 return Eoferr = -1;

+ 67 - 67
library/cpp/int128/ut/int128_old_ut.cpp

@@ -1,10 +1,10 @@
 #include <library/cpp/testing/unittest/registar.h>
 #include <library/cpp/testing/unittest/registar.h>
 #include <library/cpp/int128/int128.h>
 #include <library/cpp/int128/int128.h>
-
+ 
 #include "int128_ut_helpers.h"
 #include "int128_ut_helpers.h"
 
 
-class TUInt128Test: public TTestBase {
-    UNIT_TEST_SUITE(TUInt128Test);
+class TUInt128Test: public TTestBase { 
+    UNIT_TEST_SUITE(TUInt128Test); 
     UNIT_TEST(Create);
     UNIT_TEST(Create);
     UNIT_TEST(Minus);
     UNIT_TEST(Minus);
     UNIT_TEST(Plus);
     UNIT_TEST(Plus);
@@ -16,100 +16,100 @@ class TUInt128Test: public TTestBase {
 #if defined(Y_HAVE_INT128)
 #if defined(Y_HAVE_INT128)
     UNIT_TEST(FromSystemUint128);
     UNIT_TEST(FromSystemUint128);
 #endif
 #endif
-    UNIT_TEST_SUITE_END();
-
-private:
-    void Create();
-    void Minus();
-    void Plus();
-    void Shift();
-    void Overflow();
-    void Underflow();
+    UNIT_TEST_SUITE_END(); 
+
+private: 
+    void Create(); 
+    void Minus(); 
+    void Plus(); 
+    void Shift(); 
+    void Overflow(); 
+    void Underflow(); 
     void ToStringTest();
     void ToStringTest();
     void FromStringTest();
     void FromStringTest();
 #if defined(Y_HAVE_INT128)
 #if defined(Y_HAVE_INT128)
     void FromSystemUint128();
     void FromSystemUint128();
 #endif
 #endif
-};
-
-UNIT_TEST_SUITE_REGISTRATION(TUInt128Test);
-
-void TUInt128Test::Create() {
+}; 
+ 
+UNIT_TEST_SUITE_REGISTRATION(TUInt128Test); 
+ 
+void TUInt128Test::Create() { 
     const ui128 n1 = 10;
     const ui128 n1 = 10;
-    UNIT_ASSERT_EQUAL(n1, 10);
-
+    UNIT_ASSERT_EQUAL(n1, 10); 
+ 
     const ui128 n2 = n1;
     const ui128 n2 = n1;
-    UNIT_ASSERT_EQUAL(n2, 10);
-
+    UNIT_ASSERT_EQUAL(n2, 10); 
+ 
     const ui128 n3(10);
     const ui128 n3(10);
-    UNIT_ASSERT_EQUAL(n3, 10);
-}
-void TUInt128Test::Minus() {
+    UNIT_ASSERT_EQUAL(n3, 10); 
+} 
+void TUInt128Test::Minus() { 
     const ui128 n2 = 20;
     const ui128 n2 = 20;
     const ui128 n3 = 30;
     const ui128 n3 = 30;
-
+ 
     ui128 n4 = n3 - n2;
     ui128 n4 = n3 - n2;
-    UNIT_ASSERT_EQUAL(n4, 10);
-
-    n4 = n4 - 2;
-    UNIT_ASSERT_EQUAL(n4, 8);
-
-    n4 -= 2;
-    UNIT_ASSERT_EQUAL(n4, 6);
-
-    n4 = 10 - n4;
-    UNIT_ASSERT_EQUAL(n4, 4);
-}
-void TUInt128Test::Plus() {
+    UNIT_ASSERT_EQUAL(n4, 10); 
+ 
+    n4 = n4 - 2; 
+    UNIT_ASSERT_EQUAL(n4, 8); 
+ 
+    n4 -= 2; 
+    UNIT_ASSERT_EQUAL(n4, 6); 
+ 
+    n4 = 10 - n4; 
+    UNIT_ASSERT_EQUAL(n4, 4); 
+} 
+void TUInt128Test::Plus() { 
     const ui128 n2 = 20;
     const ui128 n2 = 20;
     const ui128 n3 = 30;
     const ui128 n3 = 30;
-
+ 
     ui128 n4 = n3 + n2;
     ui128 n4 = n3 + n2;
-    UNIT_ASSERT_EQUAL(n4, 50);
-
-    n4 = n4 + 2;
-    UNIT_ASSERT_EQUAL(n4, 52);
-
-    n4 += 2;
-    UNIT_ASSERT_EQUAL(n4, 54);
-
-    n4 = 10 + n4;
-    UNIT_ASSERT_EQUAL(n4, 64);
-}
-void TUInt128Test::Shift() {
+    UNIT_ASSERT_EQUAL(n4, 50); 
+ 
+    n4 = n4 + 2; 
+    UNIT_ASSERT_EQUAL(n4, 52); 
+ 
+    n4 += 2; 
+    UNIT_ASSERT_EQUAL(n4, 54); 
+ 
+    n4 = 10 + n4; 
+    UNIT_ASSERT_EQUAL(n4, 64); 
+} 
+void TUInt128Test::Shift() { 
     ui128 n = 1;
     ui128 n = 1;
-
+ 
     const ui128 n4 = n << 4;
     const ui128 n4 = n << 4;
     UNIT_ASSERT_EQUAL(n4, ui128(0x0, 0x0000000000000010));
     UNIT_ASSERT_EQUAL(n4, ui128(0x0, 0x0000000000000010));
-    UNIT_ASSERT_EQUAL(n4 >> 4, 1);
-
+    UNIT_ASSERT_EQUAL(n4 >> 4, 1); 
+ 
     const ui128 n8 = n << 8;
     const ui128 n8 = n << 8;
     UNIT_ASSERT_EQUAL(n8, ui128(0x0, 0x0000000000000100));
     UNIT_ASSERT_EQUAL(n8, ui128(0x0, 0x0000000000000100));
-    UNIT_ASSERT_EQUAL(n8 >> 8, 1);
-
+    UNIT_ASSERT_EQUAL(n8 >> 8, 1); 
+ 
     const ui128 n60 = n << 60;
     const ui128 n60 = n << 60;
     UNIT_ASSERT_EQUAL(n60, ui128(0x0, 0x1000000000000000));
     UNIT_ASSERT_EQUAL(n60, ui128(0x0, 0x1000000000000000));
-    UNIT_ASSERT_EQUAL(n60 >> 60, 1);
-
+    UNIT_ASSERT_EQUAL(n60 >> 60, 1); 
+ 
     const ui128 n64 = n << 64;
     const ui128 n64 = n << 64;
     UNIT_ASSERT_EQUAL(n64, ui128(0x1, 0x0000000000000000));
     UNIT_ASSERT_EQUAL(n64, ui128(0x1, 0x0000000000000000));
-    UNIT_ASSERT_EQUAL(n64 >> 64, 1);
-
+    UNIT_ASSERT_EQUAL(n64 >> 64, 1); 
+ 
     const ui128 n124 = n << 124;
     const ui128 n124 = n << 124;
     UNIT_ASSERT_EQUAL(n124, ui128(0x1000000000000000, 0x0000000000000000));
     UNIT_ASSERT_EQUAL(n124, ui128(0x1000000000000000, 0x0000000000000000));
-    UNIT_ASSERT_EQUAL(n124 >> 124, 1);
-}
-
-void TUInt128Test::Overflow() {
+    UNIT_ASSERT_EQUAL(n124 >> 124, 1); 
+} 
+ 
+void TUInt128Test::Overflow() { 
     ui128 n = ui128(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);
     ui128 n = ui128(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);
     const ui128 n2 = n + 2;
     const ui128 n2 = n + 2;
-    UNIT_ASSERT_EQUAL(n2, 1);
-}
-void TUInt128Test::Underflow() {
+    UNIT_ASSERT_EQUAL(n2, 1); 
+} 
+void TUInt128Test::Underflow() { 
     ui128 n = 1;
     ui128 n = 1;
     const ui128 n128 = n - 2;
     const ui128 n128 = n - 2;
     UNIT_ASSERT_EQUAL(n128, ui128(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF));
     UNIT_ASSERT_EQUAL(n128, ui128(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF));
-}
+} 
 
 
 void TUInt128Test::ToStringTest() {
 void TUInt128Test::ToStringTest() {
     ui128 n(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);
     ui128 n(0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF);

Некоторые файлы не были показаны из-за большого количества измененных файлов