aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorAlexander Fokin <apfokin@gmail.com>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commit863a59a65247c24db7cb06789bc5cf79d04da32f (patch)
tree139dc000c8cd4a40f5659e421b7c75135d080307 /library
parentf64e95a9eb9ab03240599eb9581c5a9102426a96 (diff)
downloadydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/README.md4
-rw-r--r--library/cpp/archive/yarchive.cpp4
-rw-r--r--library/cpp/binsaver/bin_saver.cpp2
-rw-r--r--library/cpp/binsaver/bin_saver.h14
-rw-r--r--library/cpp/binsaver/blob_io.cpp2
-rw-r--r--library/cpp/binsaver/blob_io.h4
-rw-r--r--library/cpp/binsaver/buffered_io.cpp2
-rw-r--r--library/cpp/binsaver/class_factory.h4
-rw-r--r--library/cpp/binsaver/util_stream_io.cpp2
-rw-r--r--library/cpp/binsaver/util_stream_io.h2
-rw-r--r--library/cpp/binsaver/ya.make10
-rw-r--r--library/cpp/bit_io/bitinout_ut.cpp52
-rw-r--r--library/cpp/bit_io/bitinput.h6
-rw-r--r--library/cpp/bit_io/bitoutput.h10
-rw-r--r--library/cpp/blockcodecs/core/codecs.cpp2
-rw-r--r--library/cpp/blockcodecs/core/common.h2
-rw-r--r--library/cpp/blockcodecs/core/stream.cpp22
-rw-r--r--library/cpp/charset/ci_string.h2
-rw-r--r--library/cpp/charset/codepage.cpp12
-rw-r--r--library/cpp/charset/wide.h32
-rw-r--r--library/cpp/charset/wide_ut.cpp2
-rw-r--r--library/cpp/codecs/ut/float_huffman_ut.cpp2
-rw-r--r--library/cpp/containers/comptrie/chunked_helpers_trie.h2
-rw-r--r--library/cpp/containers/comptrie/comptrie_builder.inl2
-rw-r--r--library/cpp/containers/comptrie/key_selector.h2
-rw-r--r--library/cpp/containers/sorted_vector/sorted_vector.h6
-rw-r--r--library/cpp/containers/stack_array/stack_array.h28
-rw-r--r--library/cpp/containers/stack_vector/stack_vec.h4
-rw-r--r--library/cpp/dbg_output/dumpers.h2
-rw-r--r--library/cpp/dbg_output/engine.h4
-rw-r--r--library/cpp/dbg_output/ut/dbg_output_ut.cpp10
-rw-r--r--library/cpp/deprecated/accessors/README.md10
-rw-r--r--library/cpp/deprecated/accessors/ut/ya.make16
-rw-r--r--library/cpp/deprecated/accessors/ya.make22
-rw-r--r--library/cpp/deprecated/enum_codegen/README.md6
-rw-r--r--library/cpp/deprecated/enum_codegen/ut/ya.make20
-rw-r--r--library/cpp/deprecated/enum_codegen/ya.make18
-rw-r--r--library/cpp/deprecated/ya.make20
-rw-r--r--library/cpp/execprofile/profile.cpp2
-rw-r--r--library/cpp/getopt/small/last_getopt.h38
-rw-r--r--library/cpp/getopt/small/last_getopt_easy_setup.h24
-rw-r--r--library/cpp/getopt/small/last_getopt_opt.h276
-rw-r--r--library/cpp/getopt/small/ya.make2
-rw-r--r--library/cpp/getopt/ut/last_getopt_ut.cpp4
-rw-r--r--library/cpp/http/io/chunk.cpp38
-rw-r--r--library/cpp/http/io/chunk_ut.cpp98
-rw-r--r--library/cpp/http/io/stream.cpp30
-rw-r--r--library/cpp/http/server/http_ut.cpp12
-rw-r--r--library/cpp/json/ut/json_reader_ut.cpp2
-rw-r--r--library/cpp/json/ut/json_writer_ut.cpp2
-rw-r--r--library/cpp/lfalloc/lf_allocX64.h2
-rw-r--r--library/cpp/logger/file.cpp2
-rw-r--r--library/cpp/logger/thread.cpp6
-rw-r--r--library/cpp/logger/thread.h2
-rw-r--r--library/cpp/lwtrace/signature.h2
-rw-r--r--library/cpp/messagebus/actor/executor.cpp2
-rw-r--r--library/cpp/messagebus/actor/executor.h2
-rw-r--r--library/cpp/messagebus/actor/ring_buffer.h4
-rw-r--r--library/cpp/messagebus/actor/ring_buffer_with_spin_lock.h6
-rw-r--r--library/cpp/messagebus/debug_receiver/debug_receiver_proto.h2
-rw-r--r--library/cpp/messagebus/protobuf/ybusbuf.cpp4
-rw-r--r--library/cpp/messagebus/remote_client_connection.cpp10
-rw-r--r--library/cpp/messagebus/remote_client_session.cpp6
-rw-r--r--library/cpp/messagebus/remote_server_connection.cpp4
-rw-r--r--library/cpp/messagebus/remote_server_connection.h2
-rw-r--r--library/cpp/messagebus/remote_server_session.cpp8
-rw-r--r--library/cpp/messagebus/session_impl.cpp4
-rw-r--r--library/cpp/messagebus/test/helper/example.cpp6
-rw-r--r--library/cpp/messagebus/test/helper/object_count_check.h4
-rw-r--r--library/cpp/messagebus/test/perftest/simple_proto.cpp2
-rw-r--r--library/cpp/messagebus/test/perftest/simple_proto.h2
-rw-r--r--library/cpp/messagebus/vector_swaps.h14
-rw-r--r--library/cpp/monlib/service/service.cpp4
-rw-r--r--library/cpp/packedtypes/packed_ut.cpp2
-rw-r--r--library/cpp/protobuf/util/pb_io.cpp6
-rw-r--r--library/cpp/streams/bzip2/bzip2.h12
-rw-r--r--library/cpp/streams/lz/lz.cpp12
-rw-r--r--library/cpp/streams/lz/lz.h126
-rw-r--r--library/cpp/streams/lzma/lzma.cpp8
-rw-r--r--library/cpp/streams/lzma/lzma_ut.cpp18
-rw-r--r--library/cpp/string_utils/url/url.cpp12
-rw-r--r--library/cpp/testing/benchmark/bench.h8
-rw-r--r--library/cpp/testing/unittest/registar.cpp2
-rw-r--r--library/cpp/testing/unittest/utmain.cpp2
-rw-r--r--library/cpp/threading/task_scheduler/task_scheduler.cpp2
-rw-r--r--library/cpp/xml/document/xml-document-decl.h4
-rw-r--r--library/cpp/yson_pull/range.h2
-rw-r--r--library/ya.make4
88 files changed, 607 insertions, 607 deletions
diff --git a/library/README.md b/library/README.md
index fc418bef7b..dc39a211f5 100644
--- a/library/README.md
+++ b/library/README.md
@@ -8,7 +8,7 @@ library
2. Grouping by any other criteria **SHOULD** be defined by the language committee in `<language>` directory.
3. The library **SHOULD** be in use in at least two projects.
-
+
If you are not sure if you should put some library in `library/`, please contact `<language>` committee or arcadia-wg@yandex-team.ru.
4. The library **SHOULD** be portable.
@@ -21,7 +21,7 @@ library
6. Any code in Arcadia (except `contrib/`, `vendor/` and `util/`) **MAY** depend on the `library/`.
7. The library **MUST** be accompanied by `README.md` file and a brief description of the project.
-
+
8. The library **MUST** be accompanied by unit-tests.
9. CPU- or/and RAM-bound algorithms **SHOULD** provide benchmarks.
diff --git a/library/cpp/archive/yarchive.cpp b/library/cpp/archive/yarchive.cpp
index 1becc3e5da..2ef006beb0 100644
--- a/library/cpp/archive/yarchive.cpp
+++ b/library/cpp/archive/yarchive.cpp
@@ -244,7 +244,7 @@ namespace {
public:
inline TArchiveInputStream(const TBlob& b)
: TArchiveInputStreamBase(b)
- , TZLibDecompress(&Input_)
+ , TZLibDecompress(&Input_)
{
}
@@ -278,7 +278,7 @@ public:
const char* beg = ptr - dictlen;
TMemoryInput mi(beg, dictlen);
- TZLibDecompress d(&mi);
+ TZLibDecompress d(&mi);
const ui32 count = ESLoad<ui32>(&d);
for (size_t i = 0; i < count; ++i) {
diff --git a/library/cpp/binsaver/bin_saver.cpp b/library/cpp/binsaver/bin_saver.cpp
index fe0775af9f..034465a7cd 100644
--- a/library/cpp/binsaver/bin_saver.cpp
+++ b/library/cpp/binsaver/bin_saver.cpp
@@ -1,4 +1,4 @@
-#include "bin_saver.h"
+#include "bin_saver.h"
TClassFactory<IObjectBase>* pSaverClasses;
void StartRegisterSaveload() {
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index 412424889f..0dcc78b5ec 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -1,7 +1,7 @@
#pragma once
-#include "buffered_io.h"
-#include "class_factory.h"
+#include "buffered_io.h"
+#include "class_factory.h"
#include <library/cpp/containers/2d_array/2d_array.h>
@@ -149,9 +149,9 @@ private:
TStoredSize i = 1;
for (auto pos = data.begin(); pos != data.end(); ++pos, ++i)
indices[nSize - i] = pos->first;
- for (TStoredSize j = 0; j < nSize; ++j)
- Add(1, &indices[j]);
- for (TStoredSize j = 0; j < nSize; ++j)
+ for (TStoredSize j = 0; j < nSize; ++j)
+ Add(1, &indices[j]);
+ for (TStoredSize j = 0; j < nSize; ++j)
Add(2, &data[indices[j]]);
}
}
@@ -250,7 +250,7 @@ private:
DataChunkStr(data, sizeof(TString::char_type));
}
void DataChunkWtroka(TUtf16String& data) {
- DataChunkStr(data, sizeof(wchar16));
+ DataChunkStr(data, sizeof(wchar16));
}
void DataChunk(void* pData, i64 nSize) {
@@ -275,7 +275,7 @@ private:
// or serves as a sign that some object has been already stored - during storing
bool StableOutput;
- typedef THashMap<void*, ui32> PtrIdHash;
+ typedef THashMap<void*, ui32> PtrIdHash;
TAutoPtr<PtrIdHash> PtrIds;
typedef THashMap<ui64, TPtr<IObjectBase>> CObjectsHash;
diff --git a/library/cpp/binsaver/blob_io.cpp b/library/cpp/binsaver/blob_io.cpp
index ff10349e6f..11bd1a455c 100644
--- a/library/cpp/binsaver/blob_io.cpp
+++ b/library/cpp/binsaver/blob_io.cpp
@@ -1 +1 @@
-#include "blob_io.h"
+#include "blob_io.h"
diff --git a/library/cpp/binsaver/blob_io.h b/library/cpp/binsaver/blob_io.h
index abe518ef30..75835e7941 100644
--- a/library/cpp/binsaver/blob_io.h
+++ b/library/cpp/binsaver/blob_io.h
@@ -1,7 +1,7 @@
#pragma once
-#include "bin_saver.h"
-#include "buffered_io.h"
+#include "bin_saver.h"
+#include "buffered_io.h"
#include <util/memory/blob.h>
diff --git a/library/cpp/binsaver/buffered_io.cpp b/library/cpp/binsaver/buffered_io.cpp
index dd88b04bc5..cfedea0199 100644
--- a/library/cpp/binsaver/buffered_io.cpp
+++ b/library/cpp/binsaver/buffered_io.cpp
@@ -1,4 +1,4 @@
-#include "buffered_io.h"
+#include "buffered_io.h"
i64 IBinaryStream::LongWrite(const void* userBuffer, i64 size) {
Y_VERIFY(size >= 0, "IBinaryStream::Write() called with a negative buffer size.");
diff --git a/library/cpp/binsaver/class_factory.h b/library/cpp/binsaver/class_factory.h
index e83512331b..9327cac03d 100644
--- a/library/cpp/binsaver/class_factory.h
+++ b/library/cpp/binsaver/class_factory.h
@@ -5,7 +5,7 @@
#include <util/generic/vector.h>
#include <util/ysafeptr.h>
-
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// factory is using RTTI
// objects should inherit T and T must have at least 1 virtual function
@@ -17,7 +17,7 @@ public:
private:
typedef T* (*newFunc)();
typedef THashMap<int, newFunc> CTypeNewHash; // typeID->newFunc()
- typedef THashMap<VFT, int> CTypeIndexHash; // vftable->typeID
+ typedef THashMap<VFT, int> CTypeIndexHash; // vftable->typeID
CTypeIndexHash typeIndex;
CTypeNewHash typeInfo;
diff --git a/library/cpp/binsaver/util_stream_io.cpp b/library/cpp/binsaver/util_stream_io.cpp
index a2a79a2fe7..c2bb025f46 100644
--- a/library/cpp/binsaver/util_stream_io.cpp
+++ b/library/cpp/binsaver/util_stream_io.cpp
@@ -1 +1 @@
-#include "util_stream_io.h"
+#include "util_stream_io.h"
diff --git a/library/cpp/binsaver/util_stream_io.h b/library/cpp/binsaver/util_stream_io.h
index d65d630b93..4aa4e059cf 100644
--- a/library/cpp/binsaver/util_stream_io.h
+++ b/library/cpp/binsaver/util_stream_io.h
@@ -1,6 +1,6 @@
#pragma once
-#include "bin_saver.h"
+#include "bin_saver.h"
#include <util/stream/input.h>
#include <util/stream/output.h>
diff --git a/library/cpp/binsaver/ya.make b/library/cpp/binsaver/ya.make
index 9693c54639..f17483e2cc 100644
--- a/library/cpp/binsaver/ya.make
+++ b/library/cpp/binsaver/ya.make
@@ -3,12 +3,12 @@ LIBRARY()
OWNER(gulin)
SRCS(
- class_factory.h
- bin_saver.cpp
- blob_io.cpp
- buffered_io.cpp
+ class_factory.h
+ bin_saver.cpp
+ blob_io.cpp
+ buffered_io.cpp
mem_io.cpp
- util_stream_io.cpp
+ util_stream_io.cpp
)
PEERDIR(
diff --git a/library/cpp/bit_io/bitinout_ut.cpp b/library/cpp/bit_io/bitinout_ut.cpp
index 23a1ddf344..b678c422c3 100644
--- a/library/cpp/bit_io/bitinout_ut.cpp
+++ b/library/cpp/bit_io/bitinout_ut.cpp
@@ -14,35 +14,35 @@ namespace NBitIO {
"00001010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 "
"10110101 01010101 01010101 01010101 01010101 01010101 01010101 01010101 "
"01000000";
-
- inline ui64 Bits(ui64 bytes) {
- return bytes << 3ULL;
- }
-
+
+ inline ui64 Bits(ui64 bytes) {
+ return bytes << 3ULL;
+ }
+
inline TString PrintBits(const char* a, const char* b, bool reverse = false) {
TString s;
- TStringOutput out(s);
- for (const char* it = a; it != b; ++it) {
- if (it != a)
- out << ' ';
-
- ui8 byte = *it;
-
- if (reverse)
- byte = ReverseBits(byte);
-
- for (ui32 mask = 1; mask < 0xff; mask <<= 1) {
- out << ((byte & mask) ? '1' : '0');
- }
- }
-
- return s;
- }
-
- template <typename T>
+ TStringOutput out(s);
+ for (const char* it = a; it != b; ++it) {
+ if (it != a)
+ out << ' ';
+
+ ui8 byte = *it;
+
+ if (reverse)
+ byte = ReverseBits(byte);
+
+ for (ui32 mask = 1; mask < 0xff; mask <<= 1) {
+ out << ((byte & mask) ? '1' : '0');
+ }
+ }
+
+ return s;
+ }
+
+ template <typename T>
inline TString PrintBits(T t, ui32 bits = Bits(sizeof(T))) {
- return PrintBits((char*)&t, ((char*)&t) + BytesUp(bits));
- }
+ return PrintBits((char*)&t, ((char*)&t) + BytesUp(bits));
+ }
}
class TBitIOTest: public TTestBase {
diff --git a/library/cpp/bit_io/bitinput.h b/library/cpp/bit_io/bitinput.h
index 85711eb7f9..7c198bbff1 100644
--- a/library/cpp/bit_io/bitinput.h
+++ b/library/cpp/bit_io/bitinput.h
@@ -6,8 +6,8 @@
#include <util/generic/vector.h>
#include <util/generic/yexception.h>
-#include <iterator>
-
+#include <iterator>
+
namespace NBitIO {
// Based on junk/solar/codecs/bitstream.h
@@ -15,7 +15,7 @@ namespace NBitIO {
public:
template <typename TVec>
explicit TBitInput(const TVec& vec)
- : TBitInputImpl(std::begin(vec), std::end(vec))
+ : TBitInputImpl(std::begin(vec), std::end(vec))
{
}
diff --git a/library/cpp/bit_io/bitoutput.h b/library/cpp/bit_io/bitoutput.h
index 2b886c1f02..29eb28034a 100644
--- a/library/cpp/bit_io/bitoutput.h
+++ b/library/cpp/bit_io/bitoutput.h
@@ -110,11 +110,11 @@ namespace NBitIO {
virtual ~TBitOutputBase() {
Flush();
}
-
- private:
- static Y_FORCE_INLINE ui64 FastZeroIfFalse(bool cond, ui64 iftrue) {
- return -i64(cond) & iftrue;
- }
+
+ private:
+ static Y_FORCE_INLINE ui64 FastZeroIfFalse(bool cond, ui64 iftrue) {
+ return -i64(cond) & iftrue;
+ }
};
template <typename TVec>
diff --git a/library/cpp/blockcodecs/core/codecs.cpp b/library/cpp/blockcodecs/core/codecs.cpp
index 21506e812b..8c6b37b2a5 100644
--- a/library/cpp/blockcodecs/core/codecs.cpp
+++ b/library/cpp/blockcodecs/core/codecs.cpp
@@ -3,7 +3,7 @@
#include "register.h"
#include <util/ysaveload.h>
-#include <util/stream/null.h>
+#include <util/stream/null.h>
#include <util/stream/mem.h>
#include <util/string/cast.h>
#include <util/string/join.h>
diff --git a/library/cpp/blockcodecs/core/common.h b/library/cpp/blockcodecs/core/common.h
index f05df4d334..d001ceadad 100644
--- a/library/cpp/blockcodecs/core/common.h
+++ b/library/cpp/blockcodecs/core/common.h
@@ -3,7 +3,7 @@
#include "codecs.h"
#include <util/ysaveload.h>
-#include <util/stream/null.h>
+#include <util/stream/null.h>
#include <util/stream/mem.h>
#include <util/string/cast.h>
#include <util/string/join.h>
diff --git a/library/cpp/blockcodecs/core/stream.cpp b/library/cpp/blockcodecs/core/stream.cpp
index 4f7db3c32b..ab9d3099de 100644
--- a/library/cpp/blockcodecs/core/stream.cpp
+++ b/library/cpp/blockcodecs/core/stream.cpp
@@ -160,13 +160,13 @@ TDecodedInput::TDecodedInput(IInputStream* in, const ICodec* codec)
TDecodedInput::~TDecodedInput() = default;
-size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
+size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
if (!S_) {
- return 0;
+ return 0;
}
- TCodecID codecId;
- TBlockLen blockLen;
+ TCodecID codecId;
+ TBlockLen blockLen;
{
const size_t payload = sizeof(TCodecID) + sizeof(TBlockLen);
@@ -176,14 +176,14 @@ size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
TMemoryInput in(buf, payload);
- ::Load(&in, codecId);
- ::Load(&in, blockLen);
+ ::Load(&in, codecId);
+ ::Load(&in, blockLen);
}
- if (!blockLen) {
+ if (!blockLen) {
S_ = nullptr;
- return 0;
+ return 0;
}
if (Y_UNLIKELY(blockLen > 1024 * 1024 * 1024)) {
@@ -191,9 +191,9 @@ size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
}
TBuffer block;
- block.Resize(blockLen);
+ block.Resize(blockLen);
- S_->LoadOrFail(block.Data(), blockLen);
+ S_->LoadOrFail(block.Data(), blockLen);
auto codec = CodecByID(codecId);
@@ -208,5 +208,5 @@ size_t TDecodedInput::DoUnboundedNext(const void** ptr) {
codec->Decode(block, D_);
*ptr = D_.Data();
- return D_.Size();
+ return D_.Size();
}
diff --git a/library/cpp/charset/ci_string.h b/library/cpp/charset/ci_string.h
index edf24c1b6f..0daa2587b3 100644
--- a/library/cpp/charset/ci_string.h
+++ b/library/cpp/charset/ci_string.h
@@ -62,7 +62,7 @@ public:
static int compare(const TCiString& s1, const char* p, const CodePage& cp = csYandex);
static int compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp = csYandex);
- // TODO: implement properly in TString via enum ECaseSensitivity
+ // TODO: implement properly in TString via enum ECaseSensitivity
static bool is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex);
static bool is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex);
diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp
index 0431bef31b..14bb9b328d 100644
--- a/library/cpp/charset/codepage.cpp
+++ b/library/cpp/charset/codepage.cpp
@@ -14,7 +14,7 @@
#include <util/generic/hash_set.h>
#include <util/generic/singleton.h>
#include <util/generic/yexception.h>
-#include <util/memory/pool.h>
+#include <util/memory/pool.h>
#include <cstring>
@@ -131,7 +131,7 @@ private:
using TData = THashMap<TStringBuf, ECharset, ci_hash, ci_equal_to>;
TData Data;
- TMemoryPool Pool;
+ TMemoryPool Pool;
private:
inline void AddNameWithCheck(const TString& name, ECharset code) {
@@ -141,7 +141,7 @@ private:
Y_ASSERT(Data.find(name.c_str())->second == code);
}
}
-
+
inline void AddName(const TString& name, ECharset code) {
AddNameWithCheck(name, code);
@@ -160,9 +160,9 @@ private:
}
public:
- inline TCodePageHash()
- : Pool(20 * 1024) /* Currently used: 17KB. */
- {
+ inline TCodePageHash()
+ : Pool(20 * 1024) /* Currently used: 17KB. */
+ {
TString xPrefix = "x-";
const char* name;
diff --git a/library/cpp/charset/wide.h b/library/cpp/charset/wide.h
index 32d30e849e..20d8beba48 100644
--- a/library/cpp/charset/wide.h
+++ b/library/cpp/charset/wide.h
@@ -56,30 +56,30 @@ namespace NDetail {
// Depending on template params, perform conversion of single-byte/multi-byte/utf8 string to/from wide string.
template <typename TCharType>
- inline TBasicStringBuf<TCharType> RecodeSingleByteChar(const TStringBuf src, TCharType* dst, const CodePage& cp) {
+ inline TBasicStringBuf<TCharType> RecodeSingleByteChar(const TStringBuf src, TCharType* dst, const CodePage& cp) {
Y_ASSERT(cp.SingleByteCodepage());
::CharToWide(src.data(), src.size(), dst, cp);
- return TBasicStringBuf<TCharType>(dst, src.size());
+ return TBasicStringBuf<TCharType>(dst, src.size());
}
template <typename TCharType>
- inline TStringBuf RecodeSingleByteChar(const TBasicStringBuf<TCharType> src, char* dst, const CodePage& cp) {
+ inline TStringBuf RecodeSingleByteChar(const TBasicStringBuf<TCharType> src, char* dst, const CodePage& cp) {
Y_ASSERT(cp.SingleByteCodepage());
::WideToChar(src.data(), src.size(), dst, cp.CPEnum);
return TStringBuf(dst, src.size());
}
template <typename TCharType>
- inline TBasicStringBuf<TCharType> RecodeMultiByteChar(const TStringBuf src, TCharType* dst, ECharset encoding) {
+ inline TBasicStringBuf<TCharType> RecodeMultiByteChar(const TStringBuf src, TCharType* dst, ECharset encoding) {
Y_ASSERT(!NCodepagePrivate::NativeCodepage(encoding));
size_t read = 0;
size_t written = 0;
::NICONVPrivate::RecodeToUnicode(encoding, src.data(), dst, src.size(), src.size(), read, written);
- return TBasicStringBuf<TCharType>(dst, written);
+ return TBasicStringBuf<TCharType>(dst, written);
}
template <typename TCharType>
- inline TStringBuf RecodeMultiByteChar(const TBasicStringBuf<TCharType> src, char* dst, ECharset encoding) {
+ inline TStringBuf RecodeMultiByteChar(const TBasicStringBuf<TCharType> src, char* dst, ECharset encoding) {
Y_ASSERT(!NCodepagePrivate::NativeCodepage(encoding));
size_t read = 0;
size_t written = 0;
@@ -88,15 +88,15 @@ namespace NDetail {
}
template <typename TCharType>
- inline TBasicStringBuf<TCharType> RecodeUtf8(const TStringBuf src, TCharType* dst) {
+ inline TBasicStringBuf<TCharType> RecodeUtf8(const TStringBuf src, TCharType* dst) {
size_t len = 0;
if (!::UTF8ToWide(src.data(), src.size(), dst, len))
ythrow yexception() << "Invalid UTF8: \"" << src.SubStr(0, 50) << (src.size() > 50 ? "...\"" : "\"");
- return TBasicStringBuf<TCharType>(dst, len);
+ return TBasicStringBuf<TCharType>(dst, len);
}
template <typename TCharType>
- inline TStringBuf RecodeUtf8(const TBasicStringBuf<TCharType> src, char* dst) {
+ inline TStringBuf RecodeUtf8(const TBasicStringBuf<TCharType> src, char* dst) {
size_t len = 0;
::WideToUTF8(src.data(), src.size(), dst, len);
return TStringBuf(dst, len);
@@ -105,7 +105,7 @@ namespace NDetail {
// Select one of re-coding methods from above, based on provided @encoding
template <typename TCharFrom, typename TCharTo>
- TBasicStringBuf<TCharTo> Recode(const TBasicStringBuf<TCharFrom> src, TCharTo* dst, ECharset encoding) {
+ TBasicStringBuf<TCharTo> Recode(const TBasicStringBuf<TCharFrom> src, TCharTo* dst, ECharset encoding) {
if (encoding == CODES_UTF8)
return RecodeUtf8(src, dst);
else if (SingleByteCodepage(encoding))
@@ -159,12 +159,12 @@ namespace NDetail {
// Main template interface for recoding in both directions
template <typename TCharFrom, typename TResult>
- typename TRecodeTraits<TCharFrom>::TStringBufTo Recode(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
+ typename TRecodeTraits<TCharFrom>::TStringBufTo Recode(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
// make enough room for re-coded string
TCharTo* dstbuf = TRecodeResultOps<TResult>::Reserve(dst, src.size() * TRecodeTraits<TCharTo>::ReserveSize);
// do re-coding
- TBasicStringBuf<TCharTo> res = NBaseOps::Recode(src, dstbuf, encoding);
+ TBasicStringBuf<TCharTo> res = NBaseOps::Recode(src, dstbuf, encoding);
// truncate result back to proper size
TRecodeResultOps<TResult>::Truncate(dst, res.size());
return res;
@@ -172,14 +172,14 @@ namespace NDetail {
// appending version of Recode()
template <typename TCharFrom, typename TResult>
- typename TRecodeTraits<TCharFrom>::TStringBufTo RecodeAppend(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
+ typename TRecodeTraits<TCharFrom>::TStringBufTo RecodeAppend(const TBasicStringBuf<TCharFrom> src, TResult& dst, ECharset encoding) {
using TCharTo = typename TRecodeTraits<TCharFrom>::TCharTo;
size_t dstOrigSize = TRecodeResultOps<TResult>::Size(dst);
TCharTo* dstbuf = TRecodeResultOps<TResult>::Reserve(dst, dstOrigSize + src.size() * TRecodeTraits<TCharTo>::ReserveSize);
- TBasicStringBuf<TCharTo> appended = NBaseOps::Recode(src, dstbuf + dstOrigSize, encoding);
+ TBasicStringBuf<TCharTo> appended = NBaseOps::Recode(src, dstbuf + dstOrigSize, encoding);
size_t dstFinalSize = dstOrigSize + appended.size();
TRecodeResultOps<TResult>::Truncate(dst, dstFinalSize);
- return TBasicStringBuf<TCharTo>(dstbuf, dstFinalSize);
+ return TBasicStringBuf<TCharTo>(dstbuf, dstFinalSize);
}
// special implementation for robust utf8 functions
@@ -198,7 +198,7 @@ namespace NDetail {
}
template <typename TCharFrom>
- inline typename TRecodeTraits<TCharFrom>::TStringTo Recode(const TBasicStringBuf<TCharFrom> src, ECharset encoding) {
+ inline typename TRecodeTraits<TCharFrom>::TStringTo Recode(const TBasicStringBuf<TCharFrom> src, ECharset encoding) {
typename TRecodeTraits<TCharFrom>::TStringTo res;
Recode<TCharFrom>(src, res, encoding);
return res;
diff --git a/library/cpp/charset/wide_ut.cpp b/library/cpp/charset/wide_ut.cpp
index 78947d51ba..8ecd78d7c9 100644
--- a/library/cpp/charset/wide_ut.cpp
+++ b/library/cpp/charset/wide_ut.cpp
@@ -156,7 +156,7 @@ UNIT_TEST_SUITE_REGISTRATION(TConversionTest);
do { \
/* convert char to wchar32 */ \
TTempBuf tmpbuf1(sbuf.length() * sizeof(wchar32)); \
- const TBasicStringBuf<wchar32> s4buf = NDetail::NBaseOps::Recode<char>(sbuf, reinterpret_cast<wchar32*>(tmpbuf1.Data()), enc); \
+ const TBasicStringBuf<wchar32> s4buf = NDetail::NBaseOps::Recode<char>(sbuf, reinterpret_cast<wchar32*>(tmpbuf1.Data()), enc); \
\
/* convert wchar32 to char */ \
TTempBuf tmpbuf2(s4buf.length() * 4); \
diff --git a/library/cpp/codecs/ut/float_huffman_ut.cpp b/library/cpp/codecs/ut/float_huffman_ut.cpp
index 3156fb1f46..43e57de6d4 100644
--- a/library/cpp/codecs/ut/float_huffman_ut.cpp
+++ b/library/cpp/codecs/ut/float_huffman_ut.cpp
@@ -160,7 +160,7 @@ Y_UNIT_TEST_SUITE(FloatHuffmanTest) {
line << factors[i] << ", ";
if (line.Str().size() > 80) {
result << line.Str() << Endl;
- line.Clear();
+ line.Clear();
}
}
Cerr << result.Str() << Endl;
diff --git a/library/cpp/containers/comptrie/chunked_helpers_trie.h b/library/cpp/containers/comptrie/chunked_helpers_trie.h
index cfa35f5ba2..79822b83d3 100644
--- a/library/cpp/containers/comptrie/chunked_helpers_trie.h
+++ b/library/cpp/containers/comptrie/chunked_helpers_trie.h
@@ -192,7 +192,7 @@ public:
}
void Save(IOutputStream& out) {
- Sort(Values.begin(), Values.end());
+ Sort(Values.begin(), Values.end());
TTrieMapWriter<T, true> writer;
for (typename TValues::const_iterator toValue = Values.begin(); toValue != Values.end(); ++toValue)
writer.Add(toValue->first.data(), toValue->second);
diff --git a/library/cpp/containers/comptrie/comptrie_builder.inl b/library/cpp/containers/comptrie/comptrie_builder.inl
index f273fa6571..bbf51bd26c 100644
--- a/library/cpp/containers/comptrie/comptrie_builder.inl
+++ b/library/cpp/containers/comptrie/comptrie_builder.inl
@@ -17,7 +17,7 @@
#include <util/generic/strbuf.h>
#include <util/system/align.h>
-#include <util/stream/buffer.h>
+#include <util/stream/buffer.h>
#define CONSTEXPR_MAX2(a, b) (a) > (b) ? (a) : (b)
#define CONSTEXPR_MAX3(a, b, c) CONSTEXPR_MAX2(CONSTEXPR_MAX2(a, b), c)
diff --git a/library/cpp/containers/comptrie/key_selector.h b/library/cpp/containers/comptrie/key_selector.h
index 60466cef71..910af8ec22 100644
--- a/library/cpp/containers/comptrie/key_selector.h
+++ b/library/cpp/containers/comptrie/key_selector.h
@@ -13,7 +13,7 @@ struct TCompactTrieKeySelector {
template <class TChar>
struct TCompactTrieCharKeySelector {
typedef TBasicString<TChar> TKey;
- typedef TBasicStringBuf<TChar> TKeyBuf;
+ typedef TBasicStringBuf<TChar> TKeyBuf;
};
template <>
diff --git a/library/cpp/containers/sorted_vector/sorted_vector.h b/library/cpp/containers/sorted_vector/sorted_vector.h
index 123539af9e..53e0786a8e 100644
--- a/library/cpp/containers/sorted_vector/sorted_vector.h
+++ b/library/cpp/containers/sorted_vector/sorted_vector.h
@@ -49,7 +49,7 @@ namespace NSorted {
// Sorted vector, which is order by the key. The key is extracted from the value by the provided key-extractor
template <typename TValueType, typename TKeyType = TValueType, class TKeyExtractor = TIdentity,
- class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
+ class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
class TSortedVector: public TVector<TValueType, A> {
private:
typedef TVector<TValueType, A> TBase;
@@ -327,7 +327,7 @@ namespace NSorted {
// This structure has the side-effect: if you keep a reference to an existing element
// and then inserts a new one, the existing reference can be broken (due to reallocation).
// Please keep this in mind when using this structure.
- template <typename TKeyType, typename TValueType, class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
+ template <typename TKeyType, typename TValueType, class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
class TSimpleMap:
public TSortedVector<std::pair<TKeyType, TValueType>, TKeyType, TSelect1st, TPredicate, A>,
public TMapOps<TSimpleMap<TKeyType, TValueType, TPredicate, A>>
@@ -401,7 +401,7 @@ namespace NSorted {
// This structure has the same side-effect as TSimpleMap.
// The value type must have TValueType(TKeyType) constructor in order to use [] operator
template <typename TValueType, typename TKeyType = TValueType, class TKeyExtractor = TIdentity,
- class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
+ class TPredicate = TLess<TKeyType>, class A = std::allocator<TValueType>>
class TSimpleSet: public TSortedVector<TValueType, TKeyType, TKeyExtractor, TPredicate, A> {
private:
typedef TSortedVector<TValueType, TKeyType, TKeyExtractor, TPredicate, A> TBase;
diff --git a/library/cpp/containers/stack_array/stack_array.h b/library/cpp/containers/stack_array/stack_array.h
index 28e49bfc3c..d5c8bab8d0 100644
--- a/library/cpp/containers/stack_array/stack_array.h
+++ b/library/cpp/containers/stack_array/stack_array.h
@@ -6,21 +6,21 @@
#include <util/system/defaults.h> /* For alloca. */
namespace NStackArray {
- /**
+ /**
* A stack-allocated array. Should be used instead of � variable length
- * arrays that are not part of C++ standard.
- *
- * Example usage:
- * @code
- * void f(int size) {
- * // T array[size]; // Wrong!
- * TStackArray<T> array(ALLOC_ON_STACK(T, size)); // Right!
- * // ...
- * }
- * @endcode
- *
- * Note that it is generally a *VERY BAD* idea to use this in inline methods
- * as those might be called from a loop, and then stack overflow is in the cards.
+ * arrays that are not part of C++ standard.
+ *
+ * Example usage:
+ * @code
+ * void f(int size) {
+ * // T array[size]; // Wrong!
+ * TStackArray<T> array(ALLOC_ON_STACK(T, size)); // Right!
+ * // ...
+ * }
+ * @endcode
+ *
+ * Note that it is generally a *VERY BAD* idea to use this in inline methods
+ * as those might be called from a loop, and then stack overflow is in the cards.
*/
template <class T>
class TStackArray: public TArrayRef<T> {
diff --git a/library/cpp/containers/stack_vector/stack_vec.h b/library/cpp/containers/stack_vector/stack_vec.h
index fcc5d9a2a5..04c9764374 100644
--- a/library/cpp/containers/stack_vector/stack_vec.h
+++ b/library/cpp/containers/stack_vector/stack_vec.h
@@ -14,7 +14,7 @@
template <typename T, size_t CountOnStack = 256, bool UseFallbackAlloc = true, class Alloc = std::allocator<T>>
class TStackVec;
-template <typename T, class Alloc = std::allocator<T>>
+template <typename T, class Alloc = std::allocator<T>>
using TSmallVec = TStackVec<T, 16, true, Alloc>;
template <typename T, size_t CountOnStack = 256>
@@ -23,7 +23,7 @@ using TStackOnlyVec = TStackVec<T, CountOnStack, false>;
namespace NPrivate {
template <class Alloc, class StackAlloc, typename T, typename U>
struct TRebind {
- typedef TReboundAllocator<Alloc, U> other;
+ typedef TReboundAllocator<Alloc, U> other;
};
template <class Alloc, class StackAlloc, typename T>
diff --git a/library/cpp/dbg_output/dumpers.h b/library/cpp/dbg_output/dumpers.h
index 4868e97da0..ecef242087 100644
--- a/library/cpp/dbg_output/dumpers.h
+++ b/library/cpp/dbg_output/dumpers.h
@@ -169,5 +169,5 @@ struct TDumper<std::basic_string<C, T, A>>: public TStrDumper {
};
template <class TChar>
-struct TDumper<TBasicStringBuf<TChar>>: public TStrDumper {
+struct TDumper<TBasicStringBuf<TChar>>: public TStrDumper {
};
diff --git a/library/cpp/dbg_output/engine.h b/library/cpp/dbg_output/engine.h
index f13c728c39..b5cd4797db 100644
--- a/library/cpp/dbg_output/engine.h
+++ b/library/cpp/dbg_output/engine.h
@@ -71,11 +71,11 @@ struct TIndentScope {
template <class TChar>
struct TRawLiteral {
- const TBasicStringBuf<TChar> S;
+ const TBasicStringBuf<TChar> S;
};
template <class TChar>
-static inline TRawLiteral<TChar> DumpRaw(const TBasicStringBuf<TChar>& s) noexcept {
+static inline TRawLiteral<TChar> DumpRaw(const TBasicStringBuf<TChar>& s) noexcept {
return {s};
}
diff --git a/library/cpp/dbg_output/ut/dbg_output_ut.cpp b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
index 7b285c84cb..768f2f202b 100644
--- a/library/cpp/dbg_output/ut/dbg_output_ut.cpp
+++ b/library/cpp/dbg_output/ut/dbg_output_ut.cpp
@@ -35,7 +35,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
Y_UNIT_TEST(TestVectorInt) {
TStringStream out;
out << DbgDump(TVector<int>({1, 2, 3, 4, 5}));
- UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[1, 2, 3, 4, 5]");
+ UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[1, 2, 3, 4, 5]");
}
Y_UNIT_TEST(TestMapCharToCharArray) {
@@ -48,7 +48,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
out << DbgDump(m);
- UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{'a' -> \"SMALL LETTER A\", 'b' -> (empty)}");
+ UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{'a' -> \"SMALL LETTER A\", 'b' -> (empty)}");
}
Y_UNIT_TEST(TestVectorOfVectors) {
@@ -57,7 +57,7 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
vec[0].push_back(0);
vec[1] = {wchar16('a')};
out << DbgDump(vec);
- UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[[w'\\0'], [w'a']]");
+ UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "[[w'\\0'], [w'a']]");
}
Y_UNIT_TEST(TestInfinite) {
@@ -68,13 +68,13 @@ Y_UNIT_TEST_SUITE(TContainerPrintersTest) {
TStringStream out;
int a = 1, b = 2;
out << LabeledDump(a, b, 1 + 2);
- UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"a\": 1, \"b\": 2, \"1 + 2\": 3}");
+ UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"a\": 1, \"b\": 2, \"1 + 2\": 3}");
}
Y_UNIT_TEST(TestStructDumper) {
TStringStream out;
out << DbgDump(TMyNS::TMyStruct{3, 4});
- UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"A\": 3, \"B\": 4}");
+ UNIT_ASSERT_STRINGS_EQUAL(out.Str(), "{\"A\": 3, \"B\": 4}");
}
Y_UNIT_TEST(TestColors) {
diff --git a/library/cpp/deprecated/accessors/README.md b/library/cpp/deprecated/accessors/README.md
index 498f1203e0..1490f8709d 100644
--- a/library/cpp/deprecated/accessors/README.md
+++ b/library/cpp/deprecated/accessors/README.md
@@ -1,5 +1,5 @@
-Unified accessors for Arcadia containers and user types.
-
-Accessors implemented here mix different kinds of access at the wrong abstraction level, so they shouldn't be used.
-
-If you want begin/end/size for your containers, use std::begin, std::end, std::size. If you need generic reserve / resize / clear / insert, just use appropriate container methods or do your own overloads in place.
+Unified accessors for Arcadia containers and user types.
+
+Accessors implemented here mix different kinds of access at the wrong abstraction level, so they shouldn't be used.
+
+If you want begin/end/size for your containers, use std::begin, std::end, std::size. If you need generic reserve / resize / clear / insert, just use appropriate container methods or do your own overloads in place.
diff --git a/library/cpp/deprecated/accessors/ut/ya.make b/library/cpp/deprecated/accessors/ut/ya.make
index 5ea976566f..b2a1b38e3c 100644
--- a/library/cpp/deprecated/accessors/ut/ya.make
+++ b/library/cpp/deprecated/accessors/ut/ya.make
@@ -1,9 +1,9 @@
UNITTEST_FOR(library/cpp/deprecated/accessors)
-
-OWNER(velavokr)
-
-SRCS(
- accessors_ut.cpp
-)
-
-END()
+
+OWNER(velavokr)
+
+SRCS(
+ accessors_ut.cpp
+)
+
+END()
diff --git a/library/cpp/deprecated/accessors/ya.make b/library/cpp/deprecated/accessors/ya.make
index e322026a1c..7bf1b2725a 100644
--- a/library/cpp/deprecated/accessors/ya.make
+++ b/library/cpp/deprecated/accessors/ya.make
@@ -1,11 +1,11 @@
-LIBRARY()
-
-OWNER(elric)
-
-SRCS(
- accessors.cpp
- accessors_impl.cpp
- memory_traits.cpp
-)
-
-END()
+LIBRARY()
+
+OWNER(elric)
+
+SRCS(
+ accessors.cpp
+ accessors_impl.cpp
+ memory_traits.cpp
+)
+
+END()
diff --git a/library/cpp/deprecated/enum_codegen/README.md b/library/cpp/deprecated/enum_codegen/README.md
index 3bdac29af1..80ddd74388 100644
--- a/library/cpp/deprecated/enum_codegen/README.md
+++ b/library/cpp/deprecated/enum_codegen/README.md
@@ -1,3 +1,3 @@
-Some macros for generating enum <-> string conversions.
-
-Just use GENERATE_ENUM_SERIALIZATION. See https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/#generate-enum
+Some macros for generating enum <-> string conversions.
+
+Just use GENERATE_ENUM_SERIALIZATION. See https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/#generate-enum
diff --git a/library/cpp/deprecated/enum_codegen/ut/ya.make b/library/cpp/deprecated/enum_codegen/ut/ya.make
index 32e7ad77a2..97956014b4 100644
--- a/library/cpp/deprecated/enum_codegen/ut/ya.make
+++ b/library/cpp/deprecated/enum_codegen/ut/ya.make
@@ -1,15 +1,15 @@
-UNITTEST()
-
-OWNER(g:util)
-
+UNITTEST()
+
+OWNER(g:util)
+
SRCDIR(library/cpp/deprecated/enum_codegen)
-
+
PEERDIR(
library/cpp/deprecated/enum_codegen
)
-SRCS(
- enum_codegen_ut.cpp
-)
-
-END()
+SRCS(
+ enum_codegen_ut.cpp
+)
+
+END()
diff --git a/library/cpp/deprecated/enum_codegen/ya.make b/library/cpp/deprecated/enum_codegen/ya.make
index 1df07d2192..b7f35675cf 100644
--- a/library/cpp/deprecated/enum_codegen/ya.make
+++ b/library/cpp/deprecated/enum_codegen/ya.make
@@ -1,9 +1,9 @@
-LIBRARY()
-
-OWNER(elric)
-
-SRCS(
- enum_codegen.cpp
-)
-
-END()
+LIBRARY()
+
+OWNER(elric)
+
+SRCS(
+ enum_codegen.cpp
+)
+
+END()
diff --git a/library/cpp/deprecated/ya.make b/library/cpp/deprecated/ya.make
index 6c753f68a9..3f76564c45 100644
--- a/library/cpp/deprecated/ya.make
+++ b/library/cpp/deprecated/ya.make
@@ -1,15 +1,15 @@
-RECURSE(
+RECURSE(
abstract_iterator
abstract_iterator/ut
- accessors
- accessors/ut
- autoarray
+ accessors
+ accessors/ut
+ autoarray
base64
datafile
dater_old
dater_old/ut
- enum_codegen
- enum_codegen/ut
+ enum_codegen
+ enum_codegen/ut
fgood
fgood/ut
histogram
@@ -30,13 +30,13 @@ RECURSE(
omni/ut
prog_options
prog_options/ut
- sgi_hash
- threadable
+ sgi_hash
+ threadable
transgene
datawork
datawork/conf
calc_module
- iterators_heap
+ iterators_heap
parse_utils
parse_utils/ut
small_array
@@ -46,4 +46,4 @@ RECURSE(
solartrie/test/tests
solartrie/ut
split
-)
+)
diff --git a/library/cpp/execprofile/profile.cpp b/library/cpp/execprofile/profile.cpp
index d05de20203..babccabfef 100644
--- a/library/cpp/execprofile/profile.cpp
+++ b/library/cpp/execprofile/profile.cpp
@@ -89,7 +89,7 @@ public:
stats.SearchSkipCount = SearchSkipCount;
AtomicUnlock(&WriteFlag);
- Sort(hits.begin(), hits.end(), TCompareFirst());
+ Sort(hits.begin(), hits.end(), TCompareFirst());
sampleVector.swap(hits);
}
diff --git a/library/cpp/getopt/small/last_getopt.h b/library/cpp/getopt/small/last_getopt.h
index 07687bc914..0cf4ad803d 100644
--- a/library/cpp/getopt/small/last_getopt.h
+++ b/library/cpp/getopt/small/last_getopt.h
@@ -33,29 +33,29 @@ namespace NLastGetopt {
void HandleOpt(const TOptsParser* parser) override {
const TStringBuf curval(parser->CurValOrDef());
if (curval.IsInited()) {
- StringSplitter(curval).Split(ElementsDelim).Consume([&](const TStringBuf& val) {
- TStringBuf mutableValue = val;
+ StringSplitter(curval).Split(ElementsDelim).Consume([&](const TStringBuf& val) {
+ TStringBuf mutableValue = val;
- TValue first = NPrivate::OptFromString<TValue>(mutableValue.NextTok(RangesDelim), parser->CurOpt());
- TValue last = mutableValue ? NPrivate::OptFromString<TValue>(mutableValue, parser->CurOpt()) : first;
+ TValue first = NPrivate::OptFromString<TValue>(mutableValue.NextTok(RangesDelim), parser->CurOpt());
+ TValue last = mutableValue ? NPrivate::OptFromString<TValue>(mutableValue, parser->CurOpt()) : first;
- if (last < first) {
+ if (last < first) {
throw TUsageException() << "failed to parse opt " << NPrivate::OptToString(parser->CurOpt()) << " value " << TString(val).Quote() << ": the second argument is less than the first one";
- }
+ }
- for (++last; first < last; ++first) {
- Target->insert(Target->end(), first);
- }
- });
+ for (++last; first < last; ++first) {
+ Target->insert(Target->end(), first);
+ }
+ });
}
- }
+ }
- private:
- TContainer* Target;
+ private:
+ TContainer* Target;
char ElementsDelim;
char RangesDelim;
};
-
+
template <class Container>
struct TOptSplitHandler: public IOptHandler {
public:
@@ -67,13 +67,13 @@ namespace NLastGetopt {
, Delim(delim)
{
}
-
+
void HandleOpt(const TOptsParser* parser) override {
const TStringBuf curval(parser->CurValOrDef());
if (curval.IsInited()) {
- StringSplitter(curval).Split(Delim).Consume([&](const TStringBuf& val) {
- Target->insert(Target->end(), NPrivate::OptFromString<TValue>(val, parser->CurOpt()));
- });
+ StringSplitter(curval).Split(Delim).Consume([&](const TStringBuf& val) {
+ Target->insert(Target->end(), NPrivate::OptFromString<TValue>(val, parser->CurOpt()));
+ });
}
}
@@ -81,7 +81,7 @@ namespace NLastGetopt {
TContainer* Target;
char Delim;
};
-
+
template <class TpFunc>
struct TOptKVHandler: public IOptHandler {
public:
diff --git a/library/cpp/getopt/small/last_getopt_easy_setup.h b/library/cpp/getopt/small/last_getopt_easy_setup.h
index 60dddda225..3c8100d04d 100644
--- a/library/cpp/getopt/small/last_getopt_easy_setup.h
+++ b/library/cpp/getopt/small/last_getopt_easy_setup.h
@@ -4,18 +4,18 @@
namespace NLastGetopt {
/**
- * Wrapper for TOpts class to make the life a bit easier.
- * Usual usage:
- * TEasySetup opts;
- * opts('s', "server", "MR_SERVER", "MapReduce server name in format server:port", true)
- * ('u', "user", "MR_USER", "MapReduce user name", true)
- * ('o', "output", "MR_TABLE", "Name of MR table which will contain results", true)
- * ('r', "rules", "FILE", "Filename for .rules output file") //!< This parameter is optional and has a required argument
- * ('v', "version", &PrintSvnVersionAndExit0, "Print version information") //!< Parameter with handler can't get any argument
- * ("verbose", "Be verbose") //!< You may not specify short param name
- *
- * NLastGetopt::TOptsParseResult r(&opts, argc, argv);
- */
+ * Wrapper for TOpts class to make the life a bit easier.
+ * Usual usage:
+ * TEasySetup opts;
+ * opts('s', "server", "MR_SERVER", "MapReduce server name in format server:port", true)
+ * ('u', "user", "MR_USER", "MapReduce user name", true)
+ * ('o', "output", "MR_TABLE", "Name of MR table which will contain results", true)
+ * ('r', "rules", "FILE", "Filename for .rules output file") //!< This parameter is optional and has a required argument
+ * ('v', "version", &PrintSvnVersionAndExit0, "Print version information") //!< Parameter with handler can't get any argument
+ * ("verbose", "Be verbose") //!< You may not specify short param name
+ *
+ * NLastGetopt::TOptsParseResult r(&opts, argc, argv);
+ */
class TEasySetup: public TOpts {
public:
TEasySetup(const TStringBuf& optstring = TStringBuf());
diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h
index a8dd5adca9..f3489f896d 100644
--- a/library/cpp/getopt/small/last_getopt_opt.h
+++ b/library/cpp/getopt/small/last_getopt_opt.h
@@ -21,25 +21,25 @@ namespace NLastGetopt {
};
/**
- * NLastGetopt::TOpt is a storage of data about exactly one program option.
- * The data is: parse politics and help information.
- *
- * The help information consists of following:
- * hidden or visible in help information
- * help string
- * argument name
- *
- * Parse politics is determined by following parameters:
- * argument parse politics: no/optional/required/
- * option existence: required or optional
- * handlers. See detailed documentation: <TODO:link>
- * default value: if the option has argument, but the option is ommited,
- * then the <default value> is used as the value of the argument
- * optional value: if the option has optional-argument, the option is present in parsed string,
- * but the argument is omitted, then <optional value is used>
- * in case of "not given <optional value>, omited optional argument" the <default value> is used
- * user value: allows to store arbitary pointer for handlers
- */
+ * NLastGetopt::TOpt is a storage of data about exactly one program option.
+ * The data is: parse politics and help information.
+ *
+ * The help information consists of following:
+ * hidden or visible in help information
+ * help string
+ * argument name
+ *
+ * Parse politics is determined by following parameters:
+ * argument parse politics: no/optional/required/
+ * option existence: required or optional
+ * handlers. See detailed documentation: <TODO:link>
+ * default value: if the option has argument, but the option is ommited,
+ * then the <default value> is used as the value of the argument
+ * optional value: if the option has optional-argument, the option is present in parsed string,
+ * but the argument is omitted, then <optional value is used>
+ * in case of "not given <optional value>, omited optional argument" the <default value> is used
+ * user value: allows to store arbitary pointer for handlers
+ */
class TOpt {
public:
typedef TVector<char> TShortNames;
@@ -81,180 +81,180 @@ namespace NLastGetopt {
public:
/**
- * Checks if given char can be a short name
- * @param c char to check
- */
+ * Checks if given char can be a short name
+ * @param c char to check
+ */
static bool IsAllowedShortName(unsigned char c);
/**
- * Checks if given string can be a long name
- * @param name string to check
- * @param c if given, the first bad charecter will be saved in c
- */
+ * Checks if given string can be a long name
+ * @param name string to check
+ * @param c if given, the first bad charecter will be saved in c
+ */
static bool IsAllowedLongName(const TString& name, unsigned char* c = nullptr);
/**
- * @return one of the expected representations of the option.
- * If the option has short names, will return "-<char>"
- * Otherwise will return "--<long name>"
- */
+ * @return one of the expected representations of the option.
+ * If the option has short names, will return "-<char>"
+ * Otherwise will return "--<long name>"
+ */
TString ToShortString() const;
/**
- * check if given string is one of the long names
- *
- * @param name string to check
- */
+ * check if given string is one of the long names
+ *
+ * @param name string to check
+ */
bool NameIs(const TString& name) const;
/**
- * check if given char is one of the short names
- *
- * @param c char to check
- */
+ * check if given char is one of the short names
+ *
+ * @param c char to check
+ */
bool CharIs(char c) const;
/**
- * If string has long names - will return one of them
- * Otherwise will throw
- */
+ * If string has long names - will return one of them
+ * Otherwise will throw
+ */
TString GetName() const;
/**
- * adds short alias for the option
- *
- * @param c new short name
- *
- * @return self
- */
+ * adds short alias for the option
+ *
+ * @param c new short name
+ *
+ * @return self
+ */
TOpt& AddShortName(unsigned char c);
/**
- * return all short names of the option
- */
+ * return all short names of the option
+ */
const TShortNames& GetShortNames() const {
return Chars_;
}
/**
- * adds long alias for the option
- *
- * @param name new long name
- *
- * @return self
- */
+ * adds long alias for the option
+ *
+ * @param name new long name
+ *
+ * @return self
+ */
TOpt& AddLongName(const TString& name);
/**
- * return all long names of the option
- */
+ * return all long names of the option
+ */
const TLongNames& GetLongNames() const {
return LongNames_;
}
/**
- * @return one of short names of the opt. If there is no short names exception is raised.
- */
+ * @return one of short names of the opt. If there is no short names exception is raised.
+ */
char GetChar() const;
/**
- * @return one of short names of the opt. If there is no short names '\0' returned.
- */
+ * @return one of short names of the opt. If there is no short names '\0' returned.
+ */
char GetCharOr0() const;
/**
- * @returns argument parsing politics
- */
+ * @returns argument parsing politics
+ */
const EHasArg& GetHasArg() const {
return HasArg_;
}
/**
- * sets argument parsing politics
- *
- * Note: its better use one of RequiredArgument/NoArgument/OptionalArgument methods
- *
- * @param hasArg new argument parsing mode
- * @return self
- */
+ * sets argument parsing politics
+ *
+ * Note: its better use one of RequiredArgument/NoArgument/OptionalArgument methods
+ *
+ * @param hasArg new argument parsing mode
+ * @return self
+ */
TOpt& HasArg(EHasArg hasArg) {
HasArg_ = hasArg;
return *this;
}
/**
- * @returns argument title
- */
+ * @returns argument title
+ */
TString GetArgTitle() const {
return ArgTitle_;
}
/**
- * sets argument parsing politics into REQUIRED_ARGUMENT
- *
- * @param title the new name of argument in help output
- * @return self
- */
+ * sets argument parsing politics into REQUIRED_ARGUMENT
+ *
+ * @param title the new name of argument in help output
+ * @return self
+ */
TOpt& RequiredArgument(const TString& title = "") {
ArgTitle_ = title;
return HasArg(REQUIRED_ARGUMENT);
}
/**
- * sets argument parsing politics into NO_ARGUMENT
- *
- * @return self
- */
+ * sets argument parsing politics into NO_ARGUMENT
+ *
+ * @return self
+ */
TOpt& NoArgument() {
return HasArg(NO_ARGUMENT);
}
/**
- * sets argument parsing politics into OPTIONAL_ARGUMENT
- * for details see NLastGetopt::TOpt
- *
- * @param title the new name of argument in help output
- * @return self
- */
+ * sets argument parsing politics into OPTIONAL_ARGUMENT
+ * for details see NLastGetopt::TOpt
+ *
+ * @param title the new name of argument in help output
+ * @return self
+ */
TOpt& OptionalArgument(const TString& title = "") {
ArgTitle_ = title;
return HasArg(OPTIONAL_ARGUMENT);
}
/**
- * sets argument parsing politics into OPTIONAL_ARGUMENT
- * sets the <optional value> into given
- *
- * for details see NLastGetopt::TOpt
- *
- * @param val the new <optional value>
- * @param title the new name of argument in help output
- * @return self
- */
+ * sets argument parsing politics into OPTIONAL_ARGUMENT
+ * sets the <optional value> into given
+ *
+ * for details see NLastGetopt::TOpt
+ *
+ * @param val the new <optional value>
+ * @param title the new name of argument in help output
+ * @return self
+ */
TOpt& OptionalValue(const TString& val, const TString& title = "") {
OptionalValue_ = val;
return OptionalArgument(title);
}
/**
- * checks if "argument parsing politics" is OPTIONAL_ARGUMENT and the <optional value> is set.
- */
+ * checks if "argument parsing politics" is OPTIONAL_ARGUMENT and the <optional value> is set.
+ */
bool HasOptionalValue() const {
return OPTIONAL_ARGUMENT == HasArg_ && OptionalValue_;
}
/**
- * @return optional value
- * throws exception if optional value wasn't set
- */
+ * @return optional value
+ * throws exception if optional value wasn't set
+ */
const TString& GetOptionalValue() const {
return *OptionalValue_;
}
/**
- * sets <default value>
- * @return self
- */
+ * sets <default value>
+ * @return self
+ */
template <typename T>
TOpt& DefaultValue(const T& val) {
DefaultValue_ = ToString(val);
@@ -262,74 +262,74 @@ namespace NLastGetopt {
}
/**
- * checks if default value is set.
- */
+ * checks if default value is set.
+ */
bool HasDefaultValue() const {
return DefaultValue_.Defined();
}
/**
- * @return default value
- * throws exception if <default value> wasn't set
- */
+ * @return default value
+ * throws exception if <default value> wasn't set
+ */
const TString& GetDefaultValue() const {
return *DefaultValue_;
}
/**
- * sets the option to be required
- * @return self
- */
+ * sets the option to be required
+ * @return self
+ */
TOpt& Required() {
Required_ = true;
return *this;
}
/**
- * sets the option to be optional
- * @return self
- */
+ * sets the option to be optional
+ * @return self
+ */
TOpt& Optional() {
Required_ = false;
return *this;
}
/**
- * @return true if the option is required
- */
+ * @return true if the option is required
+ */
bool IsRequired() const {
return Required_;
}
/**
- * sets the option to be hidden (invisible in help)
- * @return self
- */
+ * sets the option to be hidden (invisible in help)
+ * @return self
+ */
TOpt& Hidden() {
Hidden_ = true;
return *this;
}
/**
- * @return true if the option is hidden
- */
+ * @return true if the option is hidden
+ */
bool IsHidden() const {
return Hidden_;
}
/**
- * sets the <user value>
- * @return self
- * for details see NLastGetopt::TOpt
- */
+ * sets the <user value>
+ * @return self
+ * for details see NLastGetopt::TOpt
+ */
TOpt& UserValue(const void* userval) {
UserValue_ = userval;
return *this;
}
/**
- * @return user value
- */
+ * @return user value
+ */
const void* UserValue() const {
return UserValue_;
}
@@ -366,7 +366,7 @@ namespace NLastGetopt {
*
* See more on completion descriptions codestyle:
* https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide#L43
- */
+ */
TOpt& Help(const TString& help) {
Help_ = help;
return *this;
@@ -374,7 +374,7 @@ namespace NLastGetopt {
/**
* Get help string.
- */
+ */
const TString& GetHelp() const {
return Help_;
}
@@ -395,7 +395,7 @@ namespace NLastGetopt {
* --help -h -- print help message and exit
* --timeout -t -- specify query timeout
* ```
- */
+ */
TOpt& CompletionHelp(const TString& help) {
CompletionHelp_ = help;
return *this;
@@ -707,13 +707,13 @@ namespace NLastGetopt {
};
/**
- * NLastGetopt::TFreeArgSpec is a storage of data about free argument.
- * The data is help information and (maybe) linked named argument.
- *
- * The help information consists of following:
- * help string
- * argument name (title)
- */
+ * NLastGetopt::TFreeArgSpec is a storage of data about free argument.
+ * The data is help information and (maybe) linked named argument.
+ *
+ * The help information consists of following:
+ * help string
+ * argument name (title)
+ */
struct TFreeArgSpec {
TFreeArgSpec() = default;
TFreeArgSpec(const TString& title, const TString& help = TString(), bool optional = false)
diff --git a/library/cpp/getopt/small/ya.make b/library/cpp/getopt/small/ya.make
index 96de0f04b1..106adcaf80 100644
--- a/library/cpp/getopt/small/ya.make
+++ b/library/cpp/getopt/small/ya.make
@@ -5,7 +5,7 @@ OWNER(pg)
PEERDIR(
library/cpp/colorizer
)
-
+
SRCS(
completer.cpp
completer_command.cpp
diff --git a/library/cpp/getopt/ut/last_getopt_ut.cpp b/library/cpp/getopt/ut/last_getopt_ut.cpp
index c99a1d053d..77fefe56f5 100644
--- a/library/cpp/getopt/ut/last_getopt_ut.cpp
+++ b/library/cpp/getopt/ut/last_getopt_ut.cpp
@@ -484,7 +484,7 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) {
Y_UNIT_TEST(TestSplitValue) {
TOptsNoDefault opts;
TVector<TString> vals;
- opts.AddLongOption('s', "split").SplitHandler(&vals, ',');
+ opts.AddLongOption('s', "split").SplitHandler(&vals, ',');
TOptsParseResultTestWrapper r(&opts, V({"prog", "--split=a,b,c"}));
UNIT_ASSERT_EQUAL(vals.size(), 3);
UNIT_ASSERT_EQUAL(vals[0], "a");
@@ -495,7 +495,7 @@ Y_UNIT_TEST_SUITE(TLastGetoptTests) {
Y_UNIT_TEST(TestRangeSplitValue) {
TOptsNoDefault opts;
TVector<ui32> vals;
- opts.AddLongOption('s', "split").RangeSplitHandler(&vals, ',', '-');
+ opts.AddLongOption('s', "split").RangeSplitHandler(&vals, ',', '-');
TOptsParseResultTestWrapper r(&opts, V({"prog", "--split=1,8-10", "--split=12-14"}));
UNIT_ASSERT_EQUAL(vals.size(), 7);
UNIT_ASSERT_EQUAL(vals[0], 1);
diff --git a/library/cpp/http/io/chunk.cpp b/library/cpp/http/io/chunk.cpp
index 6975d9eac1..1bdc0fbf49 100644
--- a/library/cpp/http/io/chunk.cpp
+++ b/library/cpp/http/io/chunk.cpp
@@ -65,32 +65,32 @@ public:
}
inline size_t Read(void* buf, size_t len) {
- return Perform(len, [this, buf](size_t toRead) { return Slave_->Read(buf, toRead); });
- }
-
- inline size_t Skip(size_t len) {
- return Perform(len, [this](size_t toSkip) { return Slave_->Skip(toSkip); });
- }
-
-private:
+ return Perform(len, [this, buf](size_t toRead) { return Slave_->Read(buf, toRead); });
+ }
+
+ inline size_t Skip(size_t len) {
+ return Perform(len, [this](size_t toSkip) { return Slave_->Skip(toSkip); });
+ }
+
+private:
template <class Operation>
- inline size_t Perform(size_t len, const Operation& operation) {
+ inline size_t Perform(size_t len, const Operation& operation) {
if (!HavePendingData()) {
return 0;
}
- const size_t toProcess = Min(Pending_, len);
+ const size_t toProcess = Min(Pending_, len);
- if (toProcess) {
- const size_t processed = operation(toProcess);
+ if (toProcess) {
+ const size_t processed = operation(toProcess);
- if (!processed) {
+ if (!processed) {
ythrow yexception() << "malformed http chunk";
}
- Pending_ -= processed;
+ Pending_ -= processed;
- return processed;
+ return processed;
}
return 0;
@@ -154,10 +154,10 @@ size_t TChunkedInput::DoRead(void* buf, size_t len) {
return Impl_->Read(buf, len);
}
-size_t TChunkedInput::DoSkip(size_t len) {
- return Impl_->Skip(len);
-}
-
+size_t TChunkedInput::DoSkip(size_t len) {
+ return Impl_->Skip(len);
+}
+
class TChunkedOutput::TImpl {
typedef IOutputStream::TPart TPart;
diff --git a/library/cpp/http/io/chunk_ut.cpp b/library/cpp/http/io/chunk_ut.cpp
index da283f8568..beaeababd2 100644
--- a/library/cpp/http/io/chunk_ut.cpp
+++ b/library/cpp/http/io/chunk_ut.cpp
@@ -13,50 +13,50 @@ Y_UNIT_TEST_SUITE(TestChunkedIO) {
TString CombString(const TString& s, size_t chunkSize) {
TString result;
- for (size_t pos = 0; pos < s.size(); pos += 2 * chunkSize)
- result += s.substr(pos, chunkSize);
- return result;
- }
-
+ for (size_t pos = 0; pos < s.size(); pos += 2 * chunkSize)
+ result += s.substr(pos, chunkSize);
+ return result;
+ }
+
void WriteTestData(IOutputStream * stream, TString * contents) {
- contents->clear();
- for (size_t i = 0; i < sizeof(test_data); ++i) {
- stream->Write(test_data, i);
- contents->append(test_data, i);
- }
- }
-
+ contents->clear();
+ for (size_t i = 0; i < sizeof(test_data); ++i) {
+ stream->Write(test_data, i);
+ contents->append(test_data, i);
+ }
+ }
+
void ReadInSmallChunks(IInputStream * stream, TString * contents) {
- char buf[11];
- size_t read = 0;
-
- contents->clear();
- do {
- read = stream->Read(buf, sizeof(buf));
- contents->append(buf, read);
- } while (read > 0);
- }
-
+ char buf[11];
+ size_t read = 0;
+
+ contents->clear();
+ do {
+ read = stream->Read(buf, sizeof(buf));
+ contents->append(buf, read);
+ } while (read > 0);
+ }
+
void ReadCombed(IInputStream * stream, TString * contents, size_t chunkSize) {
Y_ASSERT(chunkSize < 128);
- char buf[128];
-
- contents->clear();
- while (true) {
- size_t read = stream->Load(buf, chunkSize);
- contents->append(buf, read);
- if (read == 0)
- break;
-
- size_t toSkip = chunkSize;
- size_t skipped = 0;
- do {
- skipped = stream->Skip(toSkip);
- toSkip -= skipped;
- } while (skipped != 0 && toSkip != 0);
- }
- }
-
+ char buf[128];
+
+ contents->clear();
+ while (true) {
+ size_t read = stream->Load(buf, chunkSize);
+ contents->append(buf, read);
+ if (read == 0)
+ break;
+
+ size_t toSkip = chunkSize;
+ size_t skipped = 0;
+ do {
+ skipped = stream->Skip(toSkip);
+ toSkip -= skipped;
+ } while (skipped != 0 && toSkip != 0);
+ }
+ }
+
Y_UNIT_TEST(TestChunkedIo) {
TTempFile tmpFile(CDATA);
TString tmp;
@@ -64,17 +64,17 @@ Y_UNIT_TEST_SUITE(TestChunkedIO) {
{
TUnbufferedFileOutput fo(CDATA);
TChunkedOutput co(&fo);
- WriteTestData(&co, &tmp);
- }
+ WriteTestData(&co, &tmp);
+ }
- {
+ {
TUnbufferedFileInput fi(CDATA);
- TChunkedInput ci(&fi);
+ TChunkedInput ci(&fi);
TString r;
- ReadInSmallChunks(&ci, &r);
-
- UNIT_ASSERT_EQUAL(r, tmp);
+ ReadInSmallChunks(&ci, &r);
+
+ UNIT_ASSERT_EQUAL(r, tmp);
}
{
@@ -82,9 +82,9 @@ Y_UNIT_TEST_SUITE(TestChunkedIO) {
TChunkedInput ci(&fi);
TString r;
- ReadCombed(&ci, &r, 11);
+ ReadCombed(&ci, &r, 11);
- UNIT_ASSERT_EQUAL(r, CombString(tmp, 11));
+ UNIT_ASSERT_EQUAL(r, CombString(tmp, 11));
}
}
diff --git a/library/cpp/http/io/stream.cpp b/library/cpp/http/io/stream.cpp
index 6689be684f..ebbe460e42 100644
--- a/library/cpp/http/io/stream.cpp
+++ b/library/cpp/http/io/stream.cpp
@@ -161,11 +161,11 @@ public:
}
inline size_t Read(void* buf, size_t len) {
- return Perform(len, [this, buf](size_t toRead) { return Input_->Read(buf, toRead); });
+ return Perform(len, [this, buf](size_t toRead) { return Input_->Read(buf, toRead); });
}
-
- inline size_t Skip(size_t len) {
- return Perform(len, [this](size_t toSkip) { return Input_->Skip(toSkip); });
+
+ inline size_t Skip(size_t len) {
+ return Perform(len, [this](size_t toSkip) { return Input_->Skip(toSkip); });
}
inline const TString& FirstLine() const noexcept {
@@ -210,8 +210,8 @@ public:
private:
template <class Operation>
- inline size_t Perform(size_t len, const Operation& operation) {
- size_t processed = operation(len);
+ inline size_t Perform(size_t len, const Operation& operation) {
+ size_t processed = operation(len);
if (processed == 0 && len > 0) {
if (!ChunkedInput_) {
Trailers_.ConstructInPlace();
@@ -222,11 +222,11 @@ private:
if (ChunkedInput_->Read(&symbol, 1) != 0) {
ythrow THttpParseException() << "some data remaining in TChunkedInput";
}
- }
- }
- return processed;
- }
-
+ }
+ }
+ return processed;
+ }
+
struct TParsedHeaders {
bool Chunked = false;
bool KeepAlive = false;
@@ -403,10 +403,10 @@ size_t THttpInput::DoRead(void* buf, size_t len) {
return Impl_->Read(buf, len);
}
-size_t THttpInput::DoSkip(size_t len) {
- return Impl_->Skip(len);
-}
-
+size_t THttpInput::DoSkip(size_t len) {
+ return Impl_->Skip(len);
+}
+
const THttpHeaders& THttpInput::Headers() const noexcept {
return Impl_->Headers();
}
diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp
index cc62bb988e..d29dbf6f79 100644
--- a/library/cpp/http/server/http_ut.cpp
+++ b/library/cpp/http/server/http_ut.cpp
@@ -234,11 +234,11 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
zlib.Flush();
zlib.Finish();
}
- r << "Content-Length: " << compressedContent.Size() << CrLf;
+ r << "Content-Length: " << compressedContent.Size() << CrLf;
r << CrLf;
s->Send(r.Data(), r.Size());
CheckContinue(si);
- Hdr = r.Str();
+ Hdr = r.Str();
TString tosend = compressedContent.Str();
s->Send(tosend.data(), tosend.size());
} else {
@@ -247,11 +247,11 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
r << CrLf;
s->Send(r.Data(), r.Size());
CheckContinue(si);
- Hdr = r.Str();
+ Hdr = r.Str();
s->Send(Content.data(), Content.size());
} else {
r << CrLf;
- Hdr = r.Str();
+ Hdr = r.Str();
s->Send(r.Data(), r.Size());
}
}
@@ -261,7 +261,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
TStringStream ss;
TransferData(&input, &ss);
- return ss.Str();
+ return ss.Str();
}
TString GetDescription() const {
@@ -271,7 +271,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
if (ContentEncoding.size()) {
ss << " with encoding=" << ContentEncoding;
}
- return ss.Str();
+ return ss.Str();
} else {
return Hdr;
}
diff --git a/library/cpp/json/ut/json_reader_ut.cpp b/library/cpp/json/ut/json_reader_ut.cpp
index cd31afa0b8..e9155569ce 100644
--- a/library/cpp/json/ut/json_reader_ut.cpp
+++ b/library/cpp/json/ut/json_reader_ut.cpp
@@ -90,7 +90,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
TReformatCallbacks cb(writer);
ReadJson(&in, &cb);
writer.Flush();
- result2 = out.Str();
+ result2 = out.Str();
}
UNIT_ASSERT_VALUES_EQUAL(result1, result2);
diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp
index ca11d34dad..2a6aa6a522 100644
--- a/library/cpp/json/ut/json_writer_ut.cpp
+++ b/library/cpp/json/ut/json_writer_ut.cpp
@@ -20,7 +20,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
json.Write((i32)2);
json.Write("key3", (ui64)3);
- UNIT_ASSERT(out.Empty());
+ UNIT_ASSERT(out.Empty());
json.Flush();
UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected1);
diff --git a/library/cpp/lfalloc/lf_allocX64.h b/library/cpp/lfalloc/lf_allocX64.h
index fd2a906d6f..e9b8a5b99a 100644
--- a/library/cpp/lfalloc/lf_allocX64.h
+++ b/library/cpp/lfalloc/lf_allocX64.h
@@ -8,7 +8,7 @@
#include <util/system/compat.h>
#include <util/system/compiler.h>
-#include <util/system/types.h>
+#include <util/system/types.h>
#ifdef _MSC_VER
#ifndef _CRT_SECURE_NO_WARNINGS
diff --git a/library/cpp/logger/file.cpp b/library/cpp/logger/file.cpp
index 15a4946eda..3cf9146df8 100644
--- a/library/cpp/logger/file.cpp
+++ b/library/cpp/logger/file.cpp
@@ -8,7 +8,7 @@
/*
* file log
*/
-class TFileLogBackend::TImpl {
+class TFileLogBackend::TImpl {
public:
inline TImpl(const TString& path)
: File_(OpenFile(path))
diff --git a/library/cpp/logger/thread.cpp b/library/cpp/logger/thread.cpp
index 0ccf9e374b..edb6f187aa 100644
--- a/library/cpp/logger/thread.cpp
+++ b/library/cpp/logger/thread.cpp
@@ -150,13 +150,13 @@ size_t TThreadedLogBackend::QueueSize() const {
}
TOwningThreadedLogBackend::TOwningThreadedLogBackend(TLogBackend* slave)
- : THolder<TLogBackend>(slave)
- , TThreadedLogBackend(Get())
+ : THolder<TLogBackend>(slave)
+ , TThreadedLogBackend(Get())
{
}
TOwningThreadedLogBackend::TOwningThreadedLogBackend(TLogBackend* slave, size_t queuelen, std::function<void()> queueOverflowCallback)
- : THolder<TLogBackend>(slave)
+ : THolder<TLogBackend>(slave)
, TThreadedLogBackend(Get(), queuelen, std::move(queueOverflowCallback))
{
}
diff --git a/library/cpp/logger/thread.h b/library/cpp/logger/thread.h
index 65f7a88e87..5f10640069 100644
--- a/library/cpp/logger/thread.h
+++ b/library/cpp/logger/thread.h
@@ -26,7 +26,7 @@ private:
THolder<TImpl> Impl_;
};
-class TOwningThreadedLogBackend: private THolder<TLogBackend>, public TThreadedLogBackend {
+class TOwningThreadedLogBackend: private THolder<TLogBackend>, public TThreadedLogBackend {
public:
TOwningThreadedLogBackend(TLogBackend* slave);
TOwningThreadedLogBackend(TLogBackend* slave, size_t queuelen, std::function<void()> queueOverflowCallback = {});
diff --git a/library/cpp/lwtrace/signature.h b/library/cpp/lwtrace/signature.h
index 868bd9bcf2..c6d4947884 100644
--- a/library/cpp/lwtrace/signature.h
+++ b/library/cpp/lwtrace/signature.h
@@ -304,7 +304,7 @@ namespace NLWTrace {
class TLiteral {
private:
TTypedParam Values[EParamTypePb_ARRAYSIZE];
-
+
public:
explicit TLiteral(const TString& text) {
Y_UNUSED(text); /* That's for windows, where we have lwtrace disabled. */
diff --git a/library/cpp/messagebus/actor/executor.cpp b/library/cpp/messagebus/actor/executor.cpp
index 7a2227a458..f7244d5f19 100644
--- a/library/cpp/messagebus/actor/executor.cpp
+++ b/library/cpp/messagebus/actor/executor.cpp
@@ -210,7 +210,7 @@ void TExecutor::Stop() {
ProcessWorkQueueHere();
}
-void TExecutor::EnqueueWork(TArrayRef<IWorkItem* const> wis) {
+void TExecutor::EnqueueWork(TArrayRef<IWorkItem* const> wis) {
if (wis.empty())
return;
diff --git a/library/cpp/messagebus/actor/executor.h b/library/cpp/messagebus/actor/executor.h
index 7292d8be53..e073b6dac6 100644
--- a/library/cpp/messagebus/actor/executor.h
+++ b/library/cpp/messagebus/actor/executor.h
@@ -2,7 +2,7 @@
#include "ring_buffer_with_spin_lock.h"
-#include <util/generic/array_ref.h>
+#include <util/generic/array_ref.h>
#include <util/generic/vector.h>
#include <util/system/condvar.h>
#include <util/system/event.h>
diff --git a/library/cpp/messagebus/actor/ring_buffer.h b/library/cpp/messagebus/actor/ring_buffer.h
index ec5706f7c7..4aaf92bcbc 100644
--- a/library/cpp/messagebus/actor/ring_buffer.h
+++ b/library/cpp/messagebus/actor/ring_buffer.h
@@ -80,7 +80,7 @@ public:
return WritePos == ReadPos;
}
- void PushAll(TArrayRef<const T> value) {
+ void PushAll(TArrayRef<const T> value) {
ReserveWritable(value.size());
ui32 secondSize;
@@ -107,7 +107,7 @@ public:
}
void Push(const T& t) {
- PushAll(MakeArrayRef(&t, 1));
+ PushAll(MakeArrayRef(&t, 1));
}
bool TryPop(T* r) {
diff --git a/library/cpp/messagebus/actor/ring_buffer_with_spin_lock.h b/library/cpp/messagebus/actor/ring_buffer_with_spin_lock.h
index f0b7cd90e4..4ec1fc2aa4 100644
--- a/library/cpp/messagebus/actor/ring_buffer_with_spin_lock.h
+++ b/library/cpp/messagebus/actor/ring_buffer_with_spin_lock.h
@@ -21,7 +21,7 @@ public:
PushAll(t);
}
- void PushAll(TArrayRef<const T> collection) {
+ void PushAll(TArrayRef<const T> collection) {
if (collection.empty()) {
return;
}
@@ -59,7 +59,7 @@ public:
}
}
- bool PushAllAndTryPop(TArrayRef<const T> collection, T* r) {
+ bool PushAllAndTryPop(TArrayRef<const T> collection, T* r) {
if (collection.size() == 0) {
return TryPop(r);
} else {
@@ -67,7 +67,7 @@ public:
*r = collection[0];
if (collection.size() > 1) {
TGuard<TSpinLock> guard(SpinLock);
- RingBuffer.PushAll(MakeArrayRef(collection.data() + 1, collection.size() - 1));
+ RingBuffer.PushAll(MakeArrayRef(collection.data() + 1, collection.size() - 1));
AtomicSet(CachedSize, RingBuffer.Size());
}
} else {
diff --git a/library/cpp/messagebus/debug_receiver/debug_receiver_proto.h b/library/cpp/messagebus/debug_receiver/debug_receiver_proto.h
index d34710dcf7..768cd24446 100644
--- a/library/cpp/messagebus/debug_receiver/debug_receiver_proto.h
+++ b/library/cpp/messagebus/debug_receiver/debug_receiver_proto.h
@@ -23,5 +23,5 @@ struct TDebugReceiverProtocol: public NBus::TBusProtocol {
void Serialize(const NBus::TBusMessage* mess, TBuffer& data) override;
- TAutoPtr<NBus::TBusMessage> Deserialize(ui16 messageType, TArrayRef<const char> payload) override;
+ TAutoPtr<NBus::TBusMessage> Deserialize(ui16 messageType, TArrayRef<const char> payload) override;
};
diff --git a/library/cpp/messagebus/protobuf/ybusbuf.cpp b/library/cpp/messagebus/protobuf/ybusbuf.cpp
index 63415b3737..711a78b558 100644
--- a/library/cpp/messagebus/protobuf/ybusbuf.cpp
+++ b/library/cpp/messagebus/protobuf/ybusbuf.cpp
@@ -37,7 +37,7 @@ void TBusBufferProtocol::RegisterType(TAutoPtr<TBusBufferBase> mess) {
Types.push_back(mess.Release());
}
-TArrayRef<TBusBufferBase* const> TBusBufferProtocol::GetTypes() const {
+TArrayRef<TBusBufferBase* const> TBusBufferProtocol::GetTypes() const {
return Types;
}
@@ -63,7 +63,7 @@ void TBusBufferProtocol::Serialize(const TBusMessage* mess, TBuffer& data) {
data.Advance(size);
}
-TAutoPtr<TBusMessage> TBusBufferProtocol::Deserialize(ui16 messageType, TArrayRef<const char> payload) {
+TAutoPtr<TBusMessage> TBusBufferProtocol::Deserialize(ui16 messageType, TArrayRef<const char> payload) {
TWhatThreadDoesPushPop pp("deserialize protobuf message");
TBusBufferBase* messageTemplate = FindType(messageType);
diff --git a/library/cpp/messagebus/remote_client_connection.cpp b/library/cpp/messagebus/remote_client_connection.cpp
index 8c7a6db3a8..ffc544ac89 100644
--- a/library/cpp/messagebus/remote_client_connection.cpp
+++ b/library/cpp/messagebus/remote_client_connection.cpp
@@ -248,7 +248,7 @@ void TRemoteClientConnection::ScheduleTimeoutMessages() {
ScheduleWrite();
}
-void TRemoteClientConnection::ReaderProcessMessageUnknownVersion(TArrayRef<const char>) {
+void TRemoteClientConnection::ReaderProcessMessageUnknownVersion(TArrayRef<const char>) {
LWPROBE(Error, ToString(MESSAGE_INVALID_VERSION), ToString(PeerAddr), "");
ReaderData.Status.Incremental.StatusCounter[MESSAGE_INVALID_VERSION] += 1;
// TODO: close connection
@@ -265,7 +265,7 @@ void TRemoteClientConnection::ClearOutgoingQueue(TMessagesPtrs& result, bool rec
GetSession()->ReleaseInFlight(result);
}
-void TRemoteClientConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> messages) {
+void TRemoteClientConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> messages) {
for (auto& message : messages) {
bool oneWay = message.LocalFlags & MESSAGE_ONE_WAY_INTERNAL;
@@ -281,7 +281,7 @@ void TRemoteClientConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> mes
// TODO: non-unique id?
}
- GetSession()->ReleaseInFlight({message.MessagePtr.Get()});
+ GetSession()->ReleaseInFlight({message.MessagePtr.Get()});
ClientHandler->OnMessageSentOneWay(message.MessagePtr.Release());
} else {
ClientHandler->OnMessageSent(message.MessagePtr.Get());
@@ -314,7 +314,7 @@ EMessageStatus TRemoteClientConnection::SendMessageImpl(TBusMessage* msg, bool w
}
}
- GetSession()->AcquireInFlight({msg});
+ GetSession()->AcquireInFlight({msg});
EMessageStatus ret = MESSAGE_OK;
@@ -334,7 +334,7 @@ EMessageStatus TRemoteClientConnection::SendMessageImpl(TBusMessage* msg, bool w
return MESSAGE_OK;
clean:
msg->LocalFlags &= ~MESSAGE_ONE_WAY_INTERNAL;
- GetSession()->ReleaseInFlight({msg});
+ GetSession()->ReleaseInFlight({msg});
return ret;
}
diff --git a/library/cpp/messagebus/remote_client_session.cpp b/library/cpp/messagebus/remote_client_session.cpp
index 3bc421944f..a31c509e7b 100644
--- a/library/cpp/messagebus/remote_client_session.cpp
+++ b/library/cpp/messagebus/remote_client_session.cpp
@@ -71,7 +71,7 @@ void TRemoteClientSession::FillStatus() {
StatusData.Status.InputPaused = false;
}
-void TRemoteClientSession::AcquireInFlight(TArrayRef<TBusMessage* const> messages) {
+void TRemoteClientSession::AcquireInFlight(TArrayRef<TBusMessage* const> messages) {
for (auto message : messages) {
Y_ASSERT(!(message->LocalFlags & MESSAGE_IN_FLIGHT_ON_CLIENT));
message->LocalFlags |= MESSAGE_IN_FLIGHT_ON_CLIENT;
@@ -79,7 +79,7 @@ void TRemoteClientSession::AcquireInFlight(TArrayRef<TBusMessage* const> message
ClientRemoteInFlight.IncrementMultiple(messages.size());
}
-void TRemoteClientSession::ReleaseInFlight(TArrayRef<TBusMessage* const> messages) {
+void TRemoteClientSession::ReleaseInFlight(TArrayRef<TBusMessage* const> messages) {
for (auto message : messages) {
Y_ASSERT(message->LocalFlags & MESSAGE_IN_FLIGHT_ON_CLIENT);
message->LocalFlags &= ~MESSAGE_IN_FLIGHT_ON_CLIENT;
@@ -88,7 +88,7 @@ void TRemoteClientSession::ReleaseInFlight(TArrayRef<TBusMessage* const> message
}
void TRemoteClientSession::ReleaseInFlightAndCallOnReply(TNonDestroyingAutoPtr<TBusMessage> request, TBusMessagePtrAndHeader& response) {
- ReleaseInFlight({request.Get()});
+ ReleaseInFlight({request.Get()});
if (Y_UNLIKELY(AtomicGet(Down))) {
InvokeOnError(request, MESSAGE_SHUTDOWN);
InvokeOnError(response.MessagePtr.Release(), MESSAGE_SHUTDOWN);
diff --git a/library/cpp/messagebus/remote_server_connection.cpp b/library/cpp/messagebus/remote_server_connection.cpp
index 74be34ded9..7de0c04c70 100644
--- a/library/cpp/messagebus/remote_server_connection.cpp
+++ b/library/cpp/messagebus/remote_server_connection.cpp
@@ -51,7 +51,7 @@ bool TRemoteServerConnection::NeedInterruptRead() {
return !GetSession()->ServerOwnedMessages.TryWait();
}
-void TRemoteServerConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> messages) {
+void TRemoteServerConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> messages) {
TInstant now = TInstant::Now();
GetSession()->ReleaseInWorkResponses(messages);
@@ -64,7 +64,7 @@ void TRemoteServerConnection::MessageSent(TArrayRef<TBusMessagePtrAndHeader> mes
}
}
-void TRemoteServerConnection::ReaderProcessMessageUnknownVersion(TArrayRef<const char> dataRef) {
+void TRemoteServerConnection::ReaderProcessMessageUnknownVersion(TArrayRef<const char> dataRef) {
TBusHeader header(dataRef);
// TODO: full version hex
LWPROBE(ServerUnknownVersion, ToString(PeerAddr), header.GetVersionInternal());
diff --git a/library/cpp/messagebus/remote_server_connection.h b/library/cpp/messagebus/remote_server_connection.h
index 63d7f20646..9f4a1d3446 100644
--- a/library/cpp/messagebus/remote_server_connection.h
+++ b/library/cpp/messagebus/remote_server_connection.h
@@ -2,7 +2,7 @@
#include "session_impl.h"
-#include <util/generic/object_counter.h>
+#include <util/generic/object_counter.h>
namespace NBus {
namespace NPrivate {
diff --git a/library/cpp/messagebus/remote_server_session.cpp b/library/cpp/messagebus/remote_server_session.cpp
index 6abbf88a60..b20aedd349 100644
--- a/library/cpp/messagebus/remote_server_session.cpp
+++ b/library/cpp/messagebus/remote_server_session.cpp
@@ -143,9 +143,9 @@ void TRemoteServerSession::FillStatus() {
StatusData.Status.InputPaused = ServerOwnedMessages.IsLocked();
}
-void TRemoteServerSession::AcquireInWorkRequests(TArrayRef<const TBusMessagePtrAndHeader> messages) {
+void TRemoteServerSession::AcquireInWorkRequests(TArrayRef<const TBusMessagePtrAndHeader> messages) {
TAtomicBase size = 0;
- for (auto message = messages.begin(); message != messages.end(); ++message) {
+ for (auto message = messages.begin(); message != messages.end(); ++message) {
Y_ASSERT(!(message->MessagePtr->LocalFlags & MESSAGE_IN_WORK));
message->MessagePtr->LocalFlags |= MESSAGE_IN_WORK;
size += message->MessagePtr->GetHeader()->Size;
@@ -154,9 +154,9 @@ void TRemoteServerSession::AcquireInWorkRequests(TArrayRef<const TBusMessagePtrA
ServerOwnedMessages.IncrementMultiple(messages.size(), size);
}
-void TRemoteServerSession::ReleaseInWorkResponses(TArrayRef<const TBusMessagePtrAndHeader> responses) {
+void TRemoteServerSession::ReleaseInWorkResponses(TArrayRef<const TBusMessagePtrAndHeader> responses) {
TAtomicBase size = 0;
- for (auto response = responses.begin(); response != responses.end(); ++response) {
+ for (auto response = responses.begin(); response != responses.end(); ++response) {
Y_ASSERT((response->MessagePtr->LocalFlags & MESSAGE_REPLY_IS_BEGING_SENT));
response->MessagePtr->LocalFlags &= ~MESSAGE_REPLY_IS_BEGING_SENT;
size += response->MessagePtr->RequestSize;
diff --git a/library/cpp/messagebus/session_impl.cpp b/library/cpp/messagebus/session_impl.cpp
index ddf9f360c4..bcac44326f 100644
--- a/library/cpp/messagebus/session_impl.cpp
+++ b/library/cpp/messagebus/session_impl.cpp
@@ -204,7 +204,7 @@ size_t TBusSessionImpl::GetInFlightImpl(const TNetAddr& addr) const {
}
}
-void TBusSessionImpl::GetInFlightBulk(TArrayRef<const TNetAddr> addrs, TArrayRef<size_t> results) const {
+void TBusSessionImpl::GetInFlightBulk(TArrayRef<const TNetAddr> addrs, TArrayRef<size_t> results) const {
Y_VERIFY(addrs.size() == results.size(), "input.size != output.size");
for (size_t i = 0; i < addrs.size(); ++i) {
results[i] = GetInFlightImpl(addrs[i]);
@@ -220,7 +220,7 @@ size_t TBusSessionImpl::GetConnectSyscallsNumForTestImpl(const TNetAddr& addr) c
}
}
-void TBusSessionImpl::GetConnectSyscallsNumBulkForTest(TArrayRef<const TNetAddr> addrs, TArrayRef<size_t> results) const {
+void TBusSessionImpl::GetConnectSyscallsNumBulkForTest(TArrayRef<const TNetAddr> addrs, TArrayRef<size_t> results) const {
Y_VERIFY(addrs.size() == results.size(), "input.size != output.size");
for (size_t i = 0; i < addrs.size(); ++i) {
results[i] = GetConnectSyscallsNumForTestImpl(addrs[i]);
diff --git a/library/cpp/messagebus/test/helper/example.cpp b/library/cpp/messagebus/test/helper/example.cpp
index 7c6d704042..a488f96493 100644
--- a/library/cpp/messagebus/test/helper/example.cpp
+++ b/library/cpp/messagebus/test/helper/example.cpp
@@ -7,7 +7,7 @@
using namespace NBus;
using namespace NBus::NTest;
-static void FillWithJunk(TArrayRef<char> data) {
+static void FillWithJunk(TArrayRef<char> data) {
TStringBuf junk =
"01234567890123456789012345678901234567890123456789012345678901234567890123456789"
"01234567890123456789012345678901234567890123456789012345678901234567890123456789"
@@ -21,7 +21,7 @@ static void FillWithJunk(TArrayRef<char> data) {
static TString JunkString(size_t len) {
TTempBuf temp(len);
- TArrayRef<char> tempArrayRef(temp.Data(), len);
+ TArrayRef<char> tempArrayRef(temp.Data(), len);
FillWithJunk(tempArrayRef);
return TString(tempArrayRef.data(), tempArrayRef.size());
@@ -87,7 +87,7 @@ void TExampleProtocol::Serialize(const TBusMessage* message, TBuffer& buffer) {
}
}
-TAutoPtr<TBusMessage> TExampleProtocol::Deserialize(ui16 messageType, TArrayRef<const char> payload) {
+TAutoPtr<TBusMessage> TExampleProtocol::Deserialize(ui16 messageType, TArrayRef<const char> payload) {
// TODO: check data
Y_UNUSED(payload);
diff --git a/library/cpp/messagebus/test/helper/object_count_check.h b/library/cpp/messagebus/test/helper/object_count_check.h
index 1c4756e58c..1bc3f90917 100644
--- a/library/cpp/messagebus/test/helper/object_count_check.h
+++ b/library/cpp/messagebus/test/helper/object_count_check.h
@@ -10,7 +10,7 @@
#include <library/cpp/messagebus/oldmodule/module.h>
#include <library/cpp/messagebus/scheduler/scheduler.h>
-#include <util/generic/object_counter.h>
+#include <util/generic/object_counter.h>
#include <util/system/type_name.h>
#include <util/stream/output.h>
@@ -29,7 +29,7 @@ struct TObjectCountCheck {
}
void operator()() {
- long oldValue = TObjectCounter<T>::ResetObjectCount();
+ long oldValue = TObjectCounter<T>::ResetObjectCount();
if (oldValue != 0) {
Cerr << "warning: previous counter: " << oldValue << " for " << TypeName<T>() << Endl;
Cerr << "won't check in this test" << Endl;
diff --git a/library/cpp/messagebus/test/perftest/simple_proto.cpp b/library/cpp/messagebus/test/perftest/simple_proto.cpp
index 19d6c15b9d..463fe6528b 100644
--- a/library/cpp/messagebus/test/perftest/simple_proto.cpp
+++ b/library/cpp/messagebus/test/perftest/simple_proto.cpp
@@ -12,7 +12,7 @@ void TSimpleProtocol::Serialize(const TBusMessage* mess, TBuffer& data) {
data.Append((const char*)&typed->Payload, 4);
}
-TAutoPtr<TBusMessage> TSimpleProtocol::Deserialize(ui16, TArrayRef<const char> payload) {
+TAutoPtr<TBusMessage> TSimpleProtocol::Deserialize(ui16, TArrayRef<const char> payload) {
if (payload.size() != 4) {
return nullptr;
}
diff --git a/library/cpp/messagebus/test/perftest/simple_proto.h b/library/cpp/messagebus/test/perftest/simple_proto.h
index 4a0cc08db3..8479181809 100644
--- a/library/cpp/messagebus/test/perftest/simple_proto.h
+++ b/library/cpp/messagebus/test/perftest/simple_proto.h
@@ -25,5 +25,5 @@ struct TSimpleProtocol: public NBus::TBusProtocol {
void Serialize(const NBus::TBusMessage* mess, TBuffer& data) override;
- TAutoPtr<NBus::TBusMessage> Deserialize(ui16 ty, TArrayRef<const char> payload) override;
+ TAutoPtr<NBus::TBusMessage> Deserialize(ui16 ty, TArrayRef<const char> payload) override;
};
diff --git a/library/cpp/messagebus/vector_swaps.h b/library/cpp/messagebus/vector_swaps.h
index b920bcf03e..1d727f58ee 100644
--- a/library/cpp/messagebus/vector_swaps.h
+++ b/library/cpp/messagebus/vector_swaps.h
@@ -1,13 +1,13 @@
#pragma once
-#include <util/generic/array_ref.h>
+#include <util/generic/array_ref.h>
#include <util/generic/noncopyable.h>
#include <util/generic/utility.h>
#include <util/system/yassert.h>
#include <stdlib.h>
-template <typename T, class A = std::allocator<T>>
+template <typename T, class A = std::allocator<T>>
class TVectorSwaps : TNonCopyable {
private:
T* Start;
@@ -40,12 +40,12 @@ public:
free(Start);
}
- operator TArrayRef<const T>() const {
- return MakeArrayRef(data(), size());
+ operator TArrayRef<const T>() const {
+ return MakeArrayRef(data(), size());
}
- operator TArrayRef<T>() {
- return MakeArrayRef(data(), size());
+ operator TArrayRef<T>() {
+ return MakeArrayRef(data(), size());
}
size_t capacity() const {
@@ -166,6 +166,6 @@ public:
}
void push_back(T& elem) {
- insert(end(), &elem, &elem + 1);
+ insert(end(), &elem, &elem + 1);
}
};
diff --git a/library/cpp/monlib/service/service.cpp b/library/cpp/monlib/service/service.cpp
index 929efbf816..29503aa1ff 100644
--- a/library/cpp/monlib/service/service.cpp
+++ b/library/cpp/monlib/service/service.cpp
@@ -1,5 +1,5 @@
-#include "service.h"
-
+#include "service.h"
+
#include <library/cpp/coroutine/engine/sockpool.h>
#include <library/cpp/http/io/stream.h>
#include <library/cpp/http/fetch/httpheader.h>
diff --git a/library/cpp/packedtypes/packed_ut.cpp b/library/cpp/packedtypes/packed_ut.cpp
index 70a22cf9c3..13fb35ef70 100644
--- a/library/cpp/packedtypes/packed_ut.cpp
+++ b/library/cpp/packedtypes/packed_ut.cpp
@@ -4,7 +4,7 @@
#include <util/system/defaults.h>
#include <util/generic/ylimits.h>
-#include <util/generic/buffer.h>
+#include <util/generic/buffer.h>
#include <util/stream/mem.h>
#include <util/stream/buffer.h>
diff --git a/library/cpp/protobuf/util/pb_io.cpp b/library/cpp/protobuf/util/pb_io.cpp
index 6270ee0624..fe2c7a6e7b 100644
--- a/library/cpp/protobuf/util/pb_io.cpp
+++ b/library/cpp/protobuf/util/pb_io.cpp
@@ -1,5 +1,5 @@
-#include "pb_io.h"
-
+#include "pb_io.h"
+
#include <library/cpp/binsaver/bin_saver.h>
#include <library/cpp/string_utils/base64/base64.h>
@@ -95,7 +95,7 @@ int operator&(NProtoBuf::Message& m, IBinSaver& f) {
void SerializeToTextFormat(const NProtoBuf::Message& m, IOutputStream& out) {
NProtoBuf::io::TCopyingOutputStreamAdaptor adaptor(&out);
-
+
if (!NProtoBuf::TextFormat::Print(m, &adaptor)) {
ythrow yexception() << "SerializeToTextFormat failed on Print";
}
diff --git a/library/cpp/streams/bzip2/bzip2.h b/library/cpp/streams/bzip2/bzip2.h
index 2322277ef6..9bfae08924 100644
--- a/library/cpp/streams/bzip2/bzip2.h
+++ b/library/cpp/streams/bzip2/bzip2.h
@@ -8,11 +8,11 @@
#define BZIP_BUF_LEN (8 * 1024)
#define BZIP_COMPRESSION_LEVEL 6
-/**
- * @addtogroup Streams_Archs
- * @{
- */
-
+/**
+ * @addtogroup Streams_Archs
+ * @{
+ */
+
class TBZipException: public yexception {
};
@@ -50,4 +50,4 @@ public:
THolder<TImpl> Impl_;
};
-/** @} */
+/** @} */
diff --git a/library/cpp/streams/lz/lz.cpp b/library/cpp/streams/lz/lz.cpp
index b65bb3ed96..93ef653eb9 100644
--- a/library/cpp/streams/lz/lz.cpp
+++ b/library/cpp/streams/lz/lz.cpp
@@ -37,19 +37,19 @@ public:
, BlockSize_(blockSize)
{
/*
- * save signature
- */
+ * save signature
+ */
static_assert(sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE, "expect sizeof(TCompressor::signature) - 1 == SIGNATURE_SIZE");
Slave_->Write(TCompressor::signature, sizeof(TCompressor::signature) - 1);
/*
- * save version
- */
+ * save version
+ */
this->Save((ui32)1);
/*
- * save block size
- */
+ * save block size
+ */
this->Save(BlockSize());
}
diff --git a/library/cpp/streams/lz/lz.h b/library/cpp/streams/lz/lz.h
index 3a2eaad88b..cdad6df4ed 100644
--- a/library/cpp/streams/lz/lz.h
+++ b/library/cpp/streams/lz/lz.h
@@ -5,31 +5,31 @@
#include <util/generic/ptr.h>
#include <util/generic/yexception.h>
-/**
- * @file
- *
- * All lz compressors compress blocks. `Write` method splits input data into
- * blocks, compresses each block and then writes each compressed block to the
- * underlying output stream. Thus compression classes are not buffered.
- * MaxBlockSize parameter specified max allowed block size.
- *
- * See http://altdevblogaday.com/2011/04/22/survey-of-fast-compression-algorithms-part-1/
- * for some comparisons.
- */
+/**
+ * @file
+ *
+ * All lz compressors compress blocks. `Write` method splits input data into
+ * blocks, compresses each block and then writes each compressed block to the
+ * underlying output stream. Thus compression classes are not buffered.
+ * MaxBlockSize parameter specified max allowed block size.
+ *
+ * See http://altdevblogaday.com/2011/04/22/survey-of-fast-compression-algorithms-part-1/
+ * for some comparisons.
+ */
struct TDecompressorError: public yexception {
};
-/**
- * @addtogroup Streams_Archs
- * @{
- */
-
-/**
- * Lz4 compressing stream.
- *
- * @see http://code.google.com/p/lz4/
+/**
+ * @addtogroup Streams_Archs
+ * @{
*/
+
+/**
+ * Lz4 compressing stream.
+ *
+ * @see http://code.google.com/p/lz4/
+ */
class TLz4Compress: public IOutputStream {
public:
TLz4Compress(IOutputStream* slave, ui16 maxBlockSize = 1 << 15);
@@ -45,11 +45,11 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * Lz4 decompressing stream.
- *
- * @see http://code.google.com/p/lz4/
- */
+/**
+ * Lz4 decompressing stream.
+ *
+ * @see http://code.google.com/p/lz4/
+ */
class TLz4Decompress: public IInputStream {
public:
TLz4Decompress(IInputStream* slave);
@@ -63,10 +63,10 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * Snappy compressing stream.
- *
- * @see http://code.google.com/p/snappy/
+/**
+ * Snappy compressing stream.
+ *
+ * @see http://code.google.com/p/snappy/
*/
class TSnappyCompress: public IOutputStream {
public:
@@ -83,11 +83,11 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * Snappy decompressing stream.
- *
- * @see http://code.google.com/p/snappy/
- */
+/**
+ * Snappy decompressing stream.
+ *
+ * @see http://code.google.com/p/snappy/
+ */
class TSnappyDecompress: public IInputStream {
public:
TSnappyDecompress(IInputStream* slave);
@@ -101,8 +101,8 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * MiniLZO compressing stream.
+/**
+ * MiniLZO compressing stream.
*/
class TLzoCompress: public IOutputStream {
public:
@@ -119,9 +119,9 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * MiniLZO decompressing stream.
- */
+/**
+ * MiniLZO decompressing stream.
+ */
class TLzoDecompress: public IInputStream {
public:
TLzoDecompress(IInputStream* slave);
@@ -135,8 +135,8 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * FastLZ compressing stream.
+/**
+ * FastLZ compressing stream.
*/
class TLzfCompress: public IOutputStream {
public:
@@ -153,9 +153,9 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * FastLZ decompressing stream.
- */
+/**
+ * FastLZ decompressing stream.
+ */
class TLzfDecompress: public IInputStream {
public:
TLzfDecompress(IInputStream* slave);
@@ -169,8 +169,8 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * QuickLZ compressing stream.
+/**
+ * QuickLZ compressing stream.
*/
class TLzqCompress: public IOutputStream {
public:
@@ -181,8 +181,8 @@ public:
};
/*
- * streaming mode - actually, backlog size
- */
+ * streaming mode - actually, backlog size
+ */
enum EMode {
M_0 = 0,
M_100000 = 1,
@@ -205,9 +205,9 @@ private:
THolder<TImpl> Impl_;
};
-/**
- * QuickLZ decompressing stream.
- */
+/**
+ * QuickLZ decompressing stream.
+ */
class TLzqDecompress: public IInputStream {
public:
TLzqDecompress(IInputStream* slave);
@@ -221,18 +221,18 @@ private:
THolder<TImpl> Impl_;
};
-/** @} */
-
-/**
- * Reads a compression signature from the provided input stream and returns a
- * corresponding decompressing stream.
- *
- * Note that returned stream doesn't own the provided input stream, thus it's
- * up to the user to free them both.
- *
- * @param input Stream to decompress.
- * @return Decompressing proxy input stream.
- */
+/** @} */
+
+/**
+ * Reads a compression signature from the provided input stream and returns a
+ * corresponding decompressing stream.
+ *
+ * Note that returned stream doesn't own the provided input stream, thus it's
+ * up to the user to free them both.
+ *
+ * @param input Stream to decompress.
+ * @return Decompressing proxy input stream.
+ */
TAutoPtr<IInputStream> OpenLzDecompressor(IInputStream* input);
TAutoPtr<IInputStream> TryOpenLzDecompressor(IInputStream* input);
TAutoPtr<IInputStream> TryOpenLzDecompressor(const TStringBuf& signature, IInputStream* input);
diff --git a/library/cpp/streams/lzma/lzma.cpp b/library/cpp/streams/lzma/lzma.cpp
index f1942fa546..e0d3e896fd 100644
--- a/library/cpp/streams/lzma/lzma.cpp
+++ b/library/cpp/streams/lzma/lzma.cpp
@@ -179,7 +179,7 @@ namespace {
inline bool FlushImpl() {
if (Out_.Avail()) {
- TransferData(&Out_, Slave_);
+ TransferData(&Out_, Slave_);
Out_.Reset(nullptr, 0);
return true;
@@ -464,12 +464,12 @@ public:
private:
bool Fill() override {
- size_t size = Input_->Next(&InBegin_);
+ size_t size = Input_->Next(&InBegin_);
- if (size) {
+ if (size) {
InEnd_ = InBegin_ + size;
- return true;
+ return true;
}
return false;
diff --git a/library/cpp/streams/lzma/lzma_ut.cpp b/library/cpp/streams/lzma/lzma_ut.cpp
index 847e98d1ca..f73d8509b6 100644
--- a/library/cpp/streams/lzma/lzma_ut.cpp
+++ b/library/cpp/streams/lzma/lzma_ut.cpp
@@ -17,12 +17,12 @@ public:
private:
size_t DoNext(const void** ptr, size_t len) override {
if (Pos < Data.end()) {
- len = Min(len, static_cast<size_t>(1));
- *ptr = Pos;
- Pos += len;
- return len;
+ len = Min(len, static_cast<size_t>(1));
+ *ptr = Pos;
+ Pos += len;
+ return len;
} else {
- return 0;
+ return 0;
}
}
@@ -69,7 +69,7 @@ private:
try {
TLzmaCompress c(&out);
- TransferData(&mi, &c);
+ TransferData(&mi, &c);
} catch (int i) {
UNIT_ASSERT_EQUAL(i, 12345);
}
@@ -85,7 +85,7 @@ private:
TStringOutput so(res);
TLzmaCompress c(&so);
- TransferData(&mi, &c);
+ TransferData(&mi, &c);
c.Finish();
}
@@ -104,7 +104,7 @@ private:
{
TMemoryInput mi(res.data(), res.size());
TStringOutput so(data1);
- TLzmaDecompress d(&mi);
+ TLzmaDecompress d(&mi);
TransferData(&d, &so);
}
@@ -115,7 +115,7 @@ private:
{
TStrokaByOneByte mi(res);
TStringOutput so(data1);
- TLzmaDecompress d(&mi);
+ TLzmaDecompress d(&mi);
TransferData(&d, &so);
}
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp
index 85f4ac5d69..1ca0c190f9 100644
--- a/library/cpp/string_utils/url/url.cpp
+++ b/library/cpp/string_utils/url/url.cpp
@@ -42,7 +42,7 @@ namespace {
return 0;
}
- template <typename TChar, typename TBounds>
+ template <typename TChar, typename TBounds>
inline size_t GetHttpPrefixSizeImpl(const TChar* url, const TBounds& urlSize, bool ignorehttps) {
const TChar httpPrefix[] = {'h', 't', 't', 'p', ':', '/', '/', 0};
const TChar httpsPrefix[] = {'h', 't', 't', 'p', 's', ':', '/', '/', 0};
@@ -55,7 +55,7 @@ namespace {
template <typename T>
inline T CutHttpPrefixImpl(const T& url, bool ignorehttps) {
- size_t prefixSize = GetHttpPrefixSizeImpl<typename T::char_type>(url.data(), TKnownSize(url.size()), ignorehttps);
+ size_t prefixSize = GetHttpPrefixSizeImpl<typename T::char_type>(url.data(), TKnownSize(url.size()), ignorehttps);
if (prefixSize)
return url.substr(prefixSize);
return url;
@@ -74,19 +74,19 @@ namespace NUrl {
} // namespace NUrl
size_t GetHttpPrefixSize(const char* url, bool ignorehttps) noexcept {
- return GetHttpPrefixSizeImpl<char>(url, TUncheckedSize(), ignorehttps);
+ return GetHttpPrefixSizeImpl<char>(url, TUncheckedSize(), ignorehttps);
}
size_t GetHttpPrefixSize(const wchar16* url, bool ignorehttps) noexcept {
- return GetHttpPrefixSizeImpl<wchar16>(url, TUncheckedSize(), ignorehttps);
+ return GetHttpPrefixSizeImpl<wchar16>(url, TUncheckedSize(), ignorehttps);
}
size_t GetHttpPrefixSize(const TStringBuf url, bool ignorehttps) noexcept {
- return GetHttpPrefixSizeImpl<char>(url.data(), TKnownSize(url.size()), ignorehttps);
+ return GetHttpPrefixSizeImpl<char>(url.data(), TKnownSize(url.size()), ignorehttps);
}
size_t GetHttpPrefixSize(const TWtringBuf url, bool ignorehttps) noexcept {
- return GetHttpPrefixSizeImpl<wchar16>(url.data(), TKnownSize(url.size()), ignorehttps);
+ return GetHttpPrefixSizeImpl<wchar16>(url.data(), TKnownSize(url.size()), ignorehttps);
}
TStringBuf CutHttpPrefix(const TStringBuf url, bool ignorehttps) noexcept {
diff --git a/library/cpp/testing/benchmark/bench.h b/library/cpp/testing/benchmark/bench.h
index 21551ad0dd..465597e4d6 100644
--- a/library/cpp/testing/benchmark/bench.h
+++ b/library/cpp/testing/benchmark/bench.h
@@ -24,16 +24,16 @@ namespace NBench {
};
}
- /**
- * Functions that states "I can read and write everywhere in memory".
+ /**
+ * Functions that states "I can read and write everywhere in memory".
*
* Use it to prevent optimizer from reordering or discarding memory writes prior to it's call,
* and force memory reads after it's call.
*/
void Clobber();
- /**
- * Forces whatever `p` points to be in memory and not in register.
+ /**
+ * Forces whatever `p` points to be in memory and not in register.
*
* @param Pointer to data.
*/
diff --git a/library/cpp/testing/unittest/registar.cpp b/library/cpp/testing/unittest/registar.cpp
index 3679b768ed..a816159f34 100644
--- a/library/cpp/testing/unittest/registar.cpp
+++ b/library/cpp/testing/unittest/registar.cpp
@@ -234,7 +234,7 @@ bool NUnitTest::ITestSuiteProcessor::CheckAccessTest(TString /*suite*/, const ch
return true;
}
-void NUnitTest::ITestSuiteProcessor::Run(std::function<void()> f, const TString& /*suite*/, const char* /*name*/, const bool /*forceFork*/) {
+void NUnitTest::ITestSuiteProcessor::Run(std::function<void()> f, const TString& /*suite*/, const char* /*name*/, const bool /*forceFork*/) {
f();
}
diff --git a/library/cpp/testing/unittest/utmain.cpp b/library/cpp/testing/unittest/utmain.cpp
index 305bc6b40f..1884778603 100644
--- a/library/cpp/testing/unittest/utmain.cpp
+++ b/library/cpp/testing/unittest/utmain.cpp
@@ -462,7 +462,7 @@ private:
return EnabledTests_.find(name) != EnabledTests_.end();
}
- void Run(std::function<void()> f, const TString& suite, const char* name, const bool forceFork) override {
+ void Run(std::function<void()> f, const TString& suite, const char* name, const bool forceFork) override {
if (!(ForkTests || forceFork) || GetIsForked()) {
return f();
}
diff --git a/library/cpp/threading/task_scheduler/task_scheduler.cpp b/library/cpp/threading/task_scheduler/task_scheduler.cpp
index 174dde4bf7..63d39b6972 100644
--- a/library/cpp/threading/task_scheduler/task_scheduler.cpp
+++ b/library/cpp/threading/task_scheduler/task_scheduler.cpp
@@ -165,7 +165,7 @@ void TTaskScheduler::ChangeDebugState(TWorkerThread* thread, const TString& stat
ss << w->DebugState << " ";
}
ss << " [" << Queue_.size() << "] [" << TaskCounter_ << "]" << Endl;
- Cerr << ss.Str();
+ Cerr << ss.Str();
}
bool TTaskScheduler::Wait(TWorkerThread* thread, TQueueIterator& toWait) {
diff --git a/library/cpp/xml/document/xml-document-decl.h b/library/cpp/xml/document/xml-document-decl.h
index bfda1fb7e6..9c7f105c40 100644
--- a/library/cpp/xml/document/xml-document-decl.h
+++ b/library/cpp/xml/document/xml-document-decl.h
@@ -59,7 +59,7 @@ namespace NXml {
TString ToString(TZtStringBuf enc = "", bool shouldFormat = true) const {
TStringStream s;
Save(s, enc, shouldFormat);
- return s.Str();
+ return s.Str();
}
void Swap(TDocument& that) {
@@ -424,7 +424,7 @@ namespace NXml {
TString ToString(TZtStringBuf enc = "") const {
TStringStream s;
Save(s, enc);
- return s.Str();
+ return s.Str();
}
void Save(IOutputStream& stream, TZtStringBuf enc = "", bool shouldFormat = false) const;
void SaveAsHtml(IOutputStream& stream, TZtStringBuf enc = "", bool shouldFormat = false) const;
diff --git a/library/cpp/yson_pull/range.h b/library/cpp/yson_pull/range.h
index f4fcf3f206..6d66a49ae0 100644
--- a/library/cpp/yson_pull/range.h
+++ b/library/cpp/yson_pull/range.h
@@ -5,7 +5,7 @@
#include <util/generic/iterator.h>
namespace NYsonPull {
- class TStreamEventsRange: public TInputRangeAdaptor<TStreamEventsRange> {
+ class TStreamEventsRange: public TInputRangeAdaptor<TStreamEventsRange> {
TReader Reader_;
bool AtEnd;
diff --git a/library/ya.make b/library/ya.make
index 86f833bd02..b408cab7ea 100644
--- a/library/ya.make
+++ b/library/ya.make
@@ -1,5 +1,5 @@
-OWNER(g:cpp-contrib)
-
+OWNER(g:cpp-contrib)
+
RECURSE(
c
cpp