diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/deprecated | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/deprecated')
-rw-r--r-- | library/cpp/deprecated/accessors/accessors.h | 2 | ||||
-rw-r--r-- | library/cpp/deprecated/accessors/accessors_ut.cpp | 18 | ||||
-rw-r--r-- | library/cpp/deprecated/accessors/memory_traits.h | 6 | ||||
-rw-r--r-- | library/cpp/deprecated/kmp/kmp.cpp | 2 | ||||
-rw-r--r-- | library/cpp/deprecated/kmp/kmp.h | 8 | ||||
-rw-r--r-- | library/cpp/deprecated/kmp/kmp_ut.cpp | 6 | ||||
-rw-r--r-- | library/cpp/deprecated/kmp/ut/ya.make | 16 | ||||
-rw-r--r-- | library/cpp/deprecated/kmp/ya.make | 20 | ||||
-rw-r--r-- | library/cpp/deprecated/mapped_file/mapped_file.cpp | 6 | ||||
-rw-r--r-- | library/cpp/deprecated/mapped_file/mapped_file.h | 10 | ||||
-rw-r--r-- | library/cpp/deprecated/split/delim_string_iter.cpp | 2 | ||||
-rw-r--r-- | library/cpp/deprecated/split/delim_string_iter_ut.cpp | 8 | ||||
-rw-r--r-- | library/cpp/deprecated/split/split_iterator.cpp | 18 | ||||
-rw-r--r-- | library/cpp/deprecated/split/split_iterator.h | 62 | ||||
-rw-r--r-- | library/cpp/deprecated/split/split_iterator_ut.cpp | 16 | ||||
-rw-r--r-- | library/cpp/deprecated/split/ya.make | 6 | ||||
-rw-r--r-- | library/cpp/deprecated/ya.make | 8 |
17 files changed, 107 insertions, 107 deletions
diff --git a/library/cpp/deprecated/accessors/accessors.h b/library/cpp/deprecated/accessors/accessors.h index 6d4b1da3ad..744dcb15d5 100644 --- a/library/cpp/deprecated/accessors/accessors.h +++ b/library/cpp/deprecated/accessors/accessors.h @@ -8,7 +8,7 @@ namespace NAccessors { * * i.e. this will work: * - * TString t; + * TString t; * const char* beg = NAccessors::Begin(t); // t.begin() * const char* end = NAccessors::End(t); // t.end() * size_t sz = NAccessors::Size(t); // t.size() diff --git a/library/cpp/deprecated/accessors/accessors_ut.cpp b/library/cpp/deprecated/accessors/accessors_ut.cpp index a9bdc9fcc4..2008c9edb9 100644 --- a/library/cpp/deprecated/accessors/accessors_ut.cpp +++ b/library/cpp/deprecated/accessors/accessors_ut.cpp @@ -58,27 +58,27 @@ private: TestRead(sbuf, "TStringBuf"); - TUtf16String wtr; + TUtf16String wtr; wtr.resize(10, 1024); - TestRead(wtr, "TUtf16String"); + TestRead(wtr, "TUtf16String"); TBuffer buf; buf.Resize(30); TestRead(buf, "TBuffer"); - TVector<ui64> vec(10, 100); + TVector<ui64> vec(10, 100); - TestRead(vec, "TVector<ui64>"); + TestRead(vec, "TVector<ui64>"); - TestWrite<TString>("TString"); - TestWrite<TVector<char>>("TVector<char>"); + TestWrite<TString>("TString"); + TestWrite<TVector<char>>("TVector<char>"); TestWrite<TBuffer>("TBuffer"); - TestWrite<TVector<ui64>>("TVector<ui64>"); - TestWrite<TUtf16String>("TUtf16String"); + TestWrite<TVector<ui64>>("TVector<ui64>"); + TestWrite<TUtf16String>("TUtf16String"); - std::array<TString, 10> sarr; + std::array<TString, 10> sarr; NAccessors::Init(sarr); NAccessors::Clear(sarr); diff --git a/library/cpp/deprecated/accessors/memory_traits.h b/library/cpp/deprecated/accessors/memory_traits.h index aa837705d3..1d19b9de33 100644 --- a/library/cpp/deprecated/accessors/memory_traits.h +++ b/library/cpp/deprecated/accessors/memory_traits.h @@ -5,7 +5,7 @@ #include <util/memory/tempbuf.h> #include <util/generic/buffer.h> #include <util/generic/strbuf.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/generic/typetraits.h> @@ -108,7 +108,7 @@ struct TMemoryTraits<std::vector<T, TAlloc>>: public TElementDependentMemoryTrai }; template <typename T, typename TAlloc> -struct TMemoryTraits<TVector<T, TAlloc>>: public TMemoryTraits<std::vector<T, TAlloc>> { +struct TMemoryTraits<TVector<T, TAlloc>>: public TMemoryTraits<std::vector<T, TAlloc>> { }; template <typename T> @@ -126,7 +126,7 @@ struct TMemoryTraits<std::basic_string<T, TCharTraits, TAlloc>>: public TElement }; template <> -struct TMemoryTraits<TString>: public TElementDependentMemoryTraits<char> { +struct TMemoryTraits<TString>: public TElementDependentMemoryTraits<char> { enum { OwnsMemory = true }; diff --git a/library/cpp/deprecated/kmp/kmp.cpp b/library/cpp/deprecated/kmp/kmp.cpp index d02074c94a..cb577b139f 100644 --- a/library/cpp/deprecated/kmp/kmp.cpp +++ b/library/cpp/deprecated/kmp/kmp.cpp @@ -8,7 +8,7 @@ TKMPMatcher::TKMPMatcher(const char* patternBegin, const char* patternEnd) ComputePrefixFunction(); } -TKMPMatcher::TKMPMatcher(const TString& pattern) +TKMPMatcher::TKMPMatcher(const TString& pattern) : Pattern(pattern) { ComputePrefixFunction(); diff --git a/library/cpp/deprecated/kmp/kmp.h b/library/cpp/deprecated/kmp/kmp.h index a7f72eece6..287382821d 100644 --- a/library/cpp/deprecated/kmp/kmp.h +++ b/library/cpp/deprecated/kmp/kmp.h @@ -1,7 +1,7 @@ #pragma once #include <util/generic/ptr.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/generic/yexception.h> @@ -32,13 +32,13 @@ void ComputePrefixFunction(const T* begin, const T* end, ssize_t** result) { class TKMPMatcher { private: TArrayHolder<ssize_t> PrefixFunction; - TString Pattern; + TString Pattern; void ComputePrefixFunction(); public: TKMPMatcher(const char* patternBegin, const char* patternEnd); - TKMPMatcher(const TString& pattern); + TKMPMatcher(const TString& pattern); bool SubStr(const char* begin, const char* end, const char*& result) const { Y_ASSERT(begin <= end); @@ -70,7 +70,7 @@ public: private: ICallback* Callback; TArrayHolder<ssize_t> PrefixFunction; - using TTVector = TVector<T>; + using TTVector = TVector<T>; TTVector Pattern; ssize_t State; TTVector Candidate; diff --git a/library/cpp/deprecated/kmp/kmp_ut.cpp b/library/cpp/deprecated/kmp/kmp_ut.cpp index c2eda83c57..04e7cf2701 100644 --- a/library/cpp/deprecated/kmp/kmp_ut.cpp +++ b/library/cpp/deprecated/kmp/kmp_ut.cpp @@ -4,8 +4,8 @@ #include <util/stream/output.h> -static TVector<int> FindAll(const TString& pattern, const TString& string) { - TVector<int> result; +static TVector<int> FindAll(const TString& pattern, const TString& string) { + TVector<int> result; TKMPMatcher kmp(pattern); const char* pResult; const char* begin = string.begin(); @@ -25,7 +25,7 @@ class TTestKMP: public TTestBase { public: void Test() { - TVector<int> ans = {0, 2}; + TVector<int> ans = {0, 2}; UNIT_ASSERT_EQUAL(FindAll("a", "aba"), ans); ans = {0}; UNIT_ASSERT_EQUAL(FindAll("aba", "aba"), ans); diff --git a/library/cpp/deprecated/kmp/ut/ya.make b/library/cpp/deprecated/kmp/ut/ya.make index 9c54ee2715..e19f716c82 100644 --- a/library/cpp/deprecated/kmp/ut/ya.make +++ b/library/cpp/deprecated/kmp/ut/ya.make @@ -1,9 +1,9 @@ UNITTEST_FOR(library/cpp/deprecated/kmp) - -OWNER(g:util) - -SRCS( - kmp_ut.cpp -) - -END() + +OWNER(g:util) + +SRCS( + kmp_ut.cpp +) + +END() diff --git a/library/cpp/deprecated/kmp/ya.make b/library/cpp/deprecated/kmp/ya.make index 7c1c557934..f8969a33a5 100644 --- a/library/cpp/deprecated/kmp/ya.make +++ b/library/cpp/deprecated/kmp/ya.make @@ -1,10 +1,10 @@ -LIBRARY() - -OWNER(g:util) - -SRCS( - kmp.cpp - kmp.h -) - -END() +LIBRARY() + +OWNER(g:util) + +SRCS( + kmp.cpp + kmp.h +) + +END() diff --git a/library/cpp/deprecated/mapped_file/mapped_file.cpp b/library/cpp/deprecated/mapped_file/mapped_file.cpp index b0e4511299..e6b9504969 100644 --- a/library/cpp/deprecated/mapped_file/mapped_file.cpp +++ b/library/cpp/deprecated/mapped_file/mapped_file.cpp @@ -27,7 +27,7 @@ void TMappedFile::precharge(size_t off, size_t size) const { Map_->Precharge(off, size); } -void TMappedFile::init(const TString& name) { +void TMappedFile::init(const TString& name) { THolder<TFileMap> map(new TFileMap(name)); TMappedFile newFile(map.Get(), name.data()); Y_UNUSED(map.Release()); @@ -35,7 +35,7 @@ void TMappedFile::init(const TString& name) { newFile.term(); } -void TMappedFile::init(const TString& name, size_t length, TFileMap::EOpenMode om) { +void TMappedFile::init(const TString& name, size_t length, TFileMap::EOpenMode om) { THolder<TFileMap> map(new TFileMap(name, length, om)); TMappedFile newFile(map.Get(), name.data()); Y_UNUSED(map.Release()); @@ -51,7 +51,7 @@ void TMappedFile::init(const TFile& file, TFileMap::EOpenMode om, const char* db newFile.term(); } -void TMappedFile::init(const TString& name, TFileMap::EOpenMode om) { +void TMappedFile::init(const TString& name, TFileMap::EOpenMode om) { THolder<TFileMap> map(new TFileMap(name, om)); TMappedFile newFile(map.Get(), name.data()); Y_UNUSED(map.Release()); diff --git a/library/cpp/deprecated/mapped_file/mapped_file.h b/library/cpp/deprecated/mapped_file/mapped_file.h index 45859ed65a..1675ccc3f7 100644 --- a/library/cpp/deprecated/mapped_file/mapped_file.h +++ b/library/cpp/deprecated/mapped_file/mapped_file.h @@ -30,18 +30,18 @@ public: term(); } - explicit TMappedFile(const TString& name) { + explicit TMappedFile(const TString& name) { Map_ = nullptr; init(name, TFileMap::oRdOnly); } TMappedFile(const TFile& file, TFileMap::EOpenMode om = TFileMap::oRdOnly, const char* dbgName = "unknown"); - void init(const TString& name); + void init(const TString& name); - void init(const TString& name, TFileMap::EOpenMode om); + void init(const TString& name, TFileMap::EOpenMode om); - void init(const TString& name, size_t length, TFileMap::EOpenMode om); + void init(const TString& name, size_t length, TFileMap::EOpenMode om); void init(const TFile&, TFileMap::EOpenMode om = TFileMap::oRdOnly, const char* dbgName = "unknown"); @@ -66,7 +66,7 @@ public: void precharge(size_t pos = 0, size_t size = (size_t)-1) const; - void swap(TMappedFile& file) noexcept { + void swap(TMappedFile& file) noexcept { DoSwap(Map_, file.Map_); } }; diff --git a/library/cpp/deprecated/split/delim_string_iter.cpp b/library/cpp/deprecated/split/delim_string_iter.cpp index af418c5bfb..af4147c18b 100644 --- a/library/cpp/deprecated/split/delim_string_iter.cpp +++ b/library/cpp/deprecated/split/delim_string_iter.cpp @@ -8,7 +8,7 @@ void TKeyValueDelimStringIter::ReadKeyAndValue() { TStringBuf currentToken(*DelimIter); size_t pos = currentToken.find('='); - if (pos == TString::npos) { + if (pos == TString::npos) { ChunkValue.Clear(); ChunkKey = currentToken; } else { diff --git a/library/cpp/deprecated/split/delim_string_iter_ut.cpp b/library/cpp/deprecated/split/delim_string_iter_ut.cpp index 18a8b2a160..c3adb53964 100644 --- a/library/cpp/deprecated/split/delim_string_iter_ut.cpp +++ b/library/cpp/deprecated/split/delim_string_iter_ut.cpp @@ -3,7 +3,7 @@ #include <library/cpp/testing/unittest/registar.h> /// Test that TDelimStringIter build on top of given string and delimeter will produce expected sequence -static void AssertStringSplit(const TString& str, const TString& delim, const TVector<TString>& expected) { +static void AssertStringSplit(const TString& str, const TString& delim, const TVector<TString>& expected) { TDelimStringIter it(str, delim); // test iterator invariants @@ -40,8 +40,8 @@ Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { } Y_UNIT_TEST(ForIter) { - TVector<TStringBuf> expected = {"1", "", "3@4", ""}; - TVector<TStringBuf> got; + TVector<TStringBuf> expected = {"1", "", "3@4", ""}; + TVector<TStringBuf> got; for (TStringBuf x : TDelimStroka("1@@@@3@4@@", "@@")) { got.push_back(x); @@ -54,7 +54,7 @@ Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { static void AssertKeyValueStringSplit( const TStringBuf str, const TStringBuf delim, - const TVector<std::pair<TStringBuf, TStringBuf>>& expected) { + const TVector<std::pair<TStringBuf, TStringBuf>>& expected) { TKeyValueDelimStringIter it(str, delim); for (const auto& expectedKeyValue : expected) { diff --git a/library/cpp/deprecated/split/split_iterator.cpp b/library/cpp/deprecated/split/split_iterator.cpp index 32262d25bd..c56a80e722 100644 --- a/library/cpp/deprecated/split/split_iterator.cpp +++ b/library/cpp/deprecated/split/split_iterator.cpp @@ -21,7 +21,7 @@ TSplitBase::TSplitBase(const char* str, size_t length) { } -TSplitBase::TSplitBase(const TString& s) +TSplitBase::TSplitBase(const TString& s) : Str(s.data()) , Len(s.size()) { @@ -35,7 +35,7 @@ TDelimitersSplit::TDelimitersSplit(const char* str, size_t length, const TSplitD { } -TDelimitersSplit::TDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters) +TDelimitersSplit::TDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters) : TSplitBase(s) , Delimiters(delimiters) { @@ -72,7 +72,7 @@ TDelimitersStrictSplit::TDelimitersStrictSplit(const char* str, size_t length, c { } -TDelimitersStrictSplit::TDelimitersStrictSplit(const TString& s, const TSplitDelimiters& delimiters) +TDelimitersStrictSplit::TDelimitersStrictSplit(const TString& s, const TSplitDelimiters& delimiters) : TSplitBase(s) , Delimiters(delimiters) { @@ -100,7 +100,7 @@ size_t TDelimitersStrictSplit::Begin() const { /****************** TScreenedDelimitersSplit ******************/ -TScreenedDelimitersSplit::TScreenedDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters, const TSplitDelimiters& screens) +TScreenedDelimitersSplit::TScreenedDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters, const TSplitDelimiters& screens) : TSplitBase(s) , Delimiters(delimiters) , Screens(screens) @@ -148,7 +148,7 @@ TDelimitersSplitWithoutTags::TDelimitersSplitWithoutTags(const char* str, size_t { } -TDelimitersSplitWithoutTags::TDelimitersSplitWithoutTags(const TString& s, const TSplitDelimiters& delimiters) +TDelimitersSplitWithoutTags::TDelimitersSplitWithoutTags(const TString& s, const TSplitDelimiters& delimiters) : TSplitBase(s) , Delimiters(delimiters) { @@ -204,7 +204,7 @@ TCharSplit::TCharSplit(const char* str, size_t length) { } -TCharSplit::TCharSplit(const TString& s) +TCharSplit::TCharSplit(const TString& s) : TSplitBase(s) { } @@ -230,7 +230,7 @@ TCharSplitWithoutTags::TCharSplitWithoutTags(const char* str, size_t length) { } -TCharSplitWithoutTags::TCharSplitWithoutTags(const TString& s) +TCharSplitWithoutTags::TCharSplitWithoutTags(const TString& s) : TSplitBase(s) { } @@ -274,7 +274,7 @@ TCharSplitWithoutTags::TIterator TCharSplitWithoutTags::Iterator() const { return TIterator(*this); } -TSubstringSplitDelimiter::TSubstringSplitDelimiter(const TString& s) +TSubstringSplitDelimiter::TSubstringSplitDelimiter(const TString& s) : Matcher(s) , Len(s.size()) { @@ -288,7 +288,7 @@ TSubstringSplit::TSubstringSplit(const char* str, size_t length, const TSubstrin { } -TSubstringSplit::TSubstringSplit(const TString& str, const TSubstringSplitDelimiter& delimiter) +TSubstringSplit::TSubstringSplit(const TString& str, const TSubstringSplitDelimiter& delimiter) : TSplitBase(str) , Delimiter(delimiter) { diff --git a/library/cpp/deprecated/split/split_iterator.h b/library/cpp/deprecated/split/split_iterator.h index 0eacc29228..23ba85bbec 100644 --- a/library/cpp/deprecated/split/split_iterator.h +++ b/library/cpp/deprecated/split/split_iterator.h @@ -8,7 +8,7 @@ #include <util/system/yassert.h> #include <util/system/defaults.h> #include <util/generic/strbuf.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/vector.h> #include <util/generic/yexception.h> @@ -45,12 +45,12 @@ using TSizeTRegion = TNumPair<size_t>; using TUi32Region = TNumPair<ui32>; template <> -inline TString ToString(const TUi32Region& r) { +inline TString ToString(const TUi32Region& r) { return TStringBuilder() << "(" << r.Begin << ", " << r.End << ")"; } template <> -inline TUi32Region FromString(const TString& s) { +inline TUi32Region FromString(const TString& s) { TUi32Region result; sscanf(s.data(), "(%" PRIu32 ", %" PRIu32 ")", &result.Begin, &result.End); return result; @@ -78,7 +78,7 @@ protected: public: TSplitBase(const char* str, size_t length); - TSplitBase(const TString& s); + TSplitBase(const TString& s); Y_FORCE_INLINE const char* GetString() const { return Str; @@ -90,7 +90,7 @@ public: private: // we don't own Str, make sure that no one calls us with temporary object - TSplitBase(TString&&) = delete; + TSplitBase(TString&&) = delete; }; #ifdef _MSC_VER @@ -107,7 +107,7 @@ public: friend class TSplitIterator<TDelimitersSplit>; TDelimitersSplit(const char* str, size_t length, const TSplitDelimiters& delimiters); - TDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters); + TDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; @@ -115,8 +115,8 @@ public: private: // we don't own Delimiters, make sure that no one calls us with temporary object TDelimitersSplit(const char*, size_t, TSplitDelimiters&&) = delete; - TDelimitersSplit(const TString&, TSplitDelimiters&&) = delete; - TDelimitersSplit(TString&&, const TSplitDelimiters&) = delete; + TDelimitersSplit(const TString&, TSplitDelimiters&&) = delete; + TDelimitersSplit(TString&&, const TSplitDelimiters&) = delete; }; class TDelimitersStrictSplit: public TSplitBase { @@ -128,7 +128,7 @@ public: friend class TSplitIterator<TDelimitersStrictSplit>; TDelimitersStrictSplit(const char* str, size_t length, const TSplitDelimiters& delimiters); - TDelimitersStrictSplit(const TString& s, const TSplitDelimiters& delimiters); + TDelimitersStrictSplit(const TString& s, const TSplitDelimiters& delimiters); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; @@ -136,8 +136,8 @@ public: private: // we don't own Delimiters, make sure that no one calls us with temporary object TDelimitersStrictSplit(const char*, size_t, TSplitDelimiters&&) = delete; - TDelimitersStrictSplit(const TString&, TSplitDelimiters&&) = delete; - TDelimitersStrictSplit(TString&&, const TSplitDelimiters&) = delete; + TDelimitersStrictSplit(const TString&, TSplitDelimiters&&) = delete; + TDelimitersStrictSplit(TString&&, const TSplitDelimiters&) = delete; }; class TScreenedDelimitersSplit: public TSplitBase { @@ -150,16 +150,16 @@ public: friend class TSplitIterator<TScreenedDelimitersSplit>; TScreenedDelimitersSplit(const char*, size_t, const TSplitDelimiters& delimiters, const TSplitDelimiters& screens); - TScreenedDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters, const TSplitDelimiters& screens); + TScreenedDelimitersSplit(const TString& s, const TSplitDelimiters& delimiters, const TSplitDelimiters& screens); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; private: // we don't own Delimiters and Screens, make sure that no one calls us with temporary object - TScreenedDelimitersSplit(TString&&, const TSplitDelimiters&, const TSplitDelimiters&) = delete; - TScreenedDelimitersSplit(const TString&, TSplitDelimiters&&, const TSplitDelimiters&) = delete; - TScreenedDelimitersSplit(const TString&, const TSplitDelimiters&, TSplitDelimiters&&) = delete; + TScreenedDelimitersSplit(TString&&, const TSplitDelimiters&, const TSplitDelimiters&) = delete; + TScreenedDelimitersSplit(const TString&, TSplitDelimiters&&, const TSplitDelimiters&) = delete; + TScreenedDelimitersSplit(const TString&, const TSplitDelimiters&, TSplitDelimiters&&) = delete; }; class TDelimitersSplitWithoutTags: public TSplitBase { @@ -173,7 +173,7 @@ public: friend class TSplitIterator<TDelimitersSplitWithoutTags>; TDelimitersSplitWithoutTags(const char* str, size_t length, const TSplitDelimiters& delimiters); - TDelimitersSplitWithoutTags(const TString& s, const TSplitDelimiters& delimiters); + TDelimitersSplitWithoutTags(const TString& s, const TSplitDelimiters& delimiters); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; @@ -181,8 +181,8 @@ public: private: // we don't own Delimiters, make sure that no one calls us with temporary object TDelimitersSplitWithoutTags(const char*, size_t, TSplitDelimiters&&) = delete; - TDelimitersSplitWithoutTags(const TString&, TSplitDelimiters&&) = delete; - TDelimitersSplitWithoutTags(TString&&, const TSplitDelimiters&) = delete; + TDelimitersSplitWithoutTags(const TString&, TSplitDelimiters&&) = delete; + TDelimitersSplitWithoutTags(TString&&, const TSplitDelimiters&) = delete; }; class TCharSplit: public TSplitBase { @@ -191,14 +191,14 @@ public: friend class TSplitIterator<TCharSplit>; TCharSplit(const char* str, size_t length); - TCharSplit(const TString& s); + TCharSplit(const TString& s); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; private: // we don't own Str, make sure that no one calls us with temporary object - TCharSplit(TString&&) = delete; + TCharSplit(TString&&) = delete; }; #ifdef _MSC_VER @@ -215,14 +215,14 @@ public: friend class TSplitIterator<TCharSplitWithoutTags>; TCharSplitWithoutTags(const char* str, size_t length); - TCharSplitWithoutTags(const TString& s); + TCharSplitWithoutTags(const TString& s); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; private: // we don't own Str, make sure that no one calls us with temporary object - TCharSplitWithoutTags(TString&&) = delete; + TCharSplitWithoutTags(TString&&) = delete; }; class TSubstringSplitDelimiter { @@ -230,7 +230,7 @@ public: TKMPMatcher Matcher; size_t Len; - TSubstringSplitDelimiter(const TString& s); + TSubstringSplitDelimiter(const TString& s); }; class TSubstringSplit: public TSplitBase { @@ -242,15 +242,15 @@ public: friend class TSplitIterator<TSubstringSplit>; TSubstringSplit(const char* str, size_t length, const TSubstringSplitDelimiter& delimiter); - TSubstringSplit(const TString& str, const TSubstringSplitDelimiter& delimiter); + TSubstringSplit(const TString& str, const TSubstringSplitDelimiter& delimiter); TIterator Iterator() const; TSizeTRegion Next(size_t& pos) const; size_t Begin() const; private: // we don't own Delimiters, make sure that no one calls us with temporary object - TSubstringSplit(TString&&, const TSubstringSplitDelimiter&) = delete; - TSubstringSplit(const TString&, TSubstringSplitDelimiter&&) = delete; + TSubstringSplit(TString&&, const TSubstringSplitDelimiter&) = delete; + TSubstringSplit(const TString&, TSubstringSplitDelimiter&&) = delete; }; template <class TSplit> @@ -258,7 +258,7 @@ class TSplitIterator { protected: const TSplit& Split; size_t Pos; - TString* CurrentStroka; + TString* CurrentStroka; public: TSplitIterator(const TSplit& split) @@ -286,7 +286,7 @@ public: const TString& NextString() { if (!CurrentStroka) - CurrentStroka = new TString(); + CurrentStroka = new TString(); TSizeTRegion region = Next(); CurrentStroka->assign(Split.Str, region.Begin, region.Length() - 1); return *CurrentStroka; @@ -296,8 +296,8 @@ public: return Pos >= Split.Len; } - TString GetTail() const { - return TString(Split.Str + Pos); + TString GetTail() const { + return TString(Split.Str + Pos); } void Skip(size_t count) { @@ -306,7 +306,7 @@ public: } }; -using TSplitTokens = TVector<TString>; +using TSplitTokens = TVector<TString>; template <typename TSplit> void Split(const TSplit& split, TSplitTokens* words) { diff --git a/library/cpp/deprecated/split/split_iterator_ut.cpp b/library/cpp/deprecated/split/split_iterator_ut.cpp index be5069c4be..2508479383 100644 --- a/library/cpp/deprecated/split/split_iterator_ut.cpp +++ b/library/cpp/deprecated/split/split_iterator_ut.cpp @@ -33,7 +33,7 @@ void TSplitIteratorTest::TestDelimiters() { void TSplitIteratorTest::TestDelimitersSplit() { { - TString s = "1a3b45cd"; + TString s = "1a3b45cd"; TSplitDelimiters delims("abcd"); TDelimitersSplit split(s, delims); TSplitTokens tokens; @@ -42,7 +42,7 @@ void TSplitIteratorTest::TestDelimitersSplit() { UNIT_ASSERT(tokens == pattern); } { - TString s = "aaaaaa"; + TString s = "aaaaaa"; TSplitDelimiters delims("abcd"); TDelimitersSplit split(s, delims); TSplitTokens tokens; @@ -54,7 +54,7 @@ void TSplitIteratorTest::TestDelimitersSplit() { void TSplitIteratorTest::TestDelimitersStrictSplit() { { - TString s = "grp@2"; + TString s = "grp@2"; TSplitDelimiters delims("@"); TDelimitersStrictSplit split(s, delims); TSplitTokens tokens; @@ -64,7 +64,7 @@ void TSplitIteratorTest::TestDelimitersStrictSplit() { } { - TString s = "@grp@2@@"; + TString s = "@grp@2@@"; TSplitDelimiters delims("@"); TDelimitersStrictSplit split(s, delims); TSplitTokens tokens; @@ -75,7 +75,7 @@ void TSplitIteratorTest::TestDelimitersStrictSplit() { } void TSplitIteratorTest::TestTail() { - TString s = "grp@2@4"; + TString s = "grp@2@4"; TSplitDelimiters delims("@"); TDelimitersSplit split(s, delims); TDelimitersSplit::TIterator it = split.Iterator(); @@ -90,7 +90,7 @@ void TSplitIteratorTest::TestTail() { void TSplitIteratorTest::TestScreenedDelimitersSplit() { { - const TString s = "77.88.58.91 - - [28/Aug/2008:00:08:07 +0400] \"GET /export/mordashka.tgz HTTP/1.1\" 304 - \"-\" \"libwww-perl/5.805\" \"news.yandex.ru,80\" \"-\" \"-\" 1219867687 \"0\" 3283 2"; + const TString s = "77.88.58.91 - - [28/Aug/2008:00:08:07 +0400] \"GET /export/mordashka.tgz HTTP/1.1\" 304 - \"-\" \"libwww-perl/5.805\" \"news.yandex.ru,80\" \"-\" \"-\" 1219867687 \"0\" 3283 2"; const TSplitDelimiters delims(" "); const TSplitDelimiters screens("\"[]"); const TScreenedDelimitersSplit splitter(s, delims, screens); @@ -113,7 +113,7 @@ void TSplitIteratorTest::TestScreenedDelimitersSplit() { UNIT_ASSERT_EQUAL(it.NextString(), "2"); } { - const TString s = "77.88.58.91 - - [28/Aug/2008:00:08:07 +0400] \"GET /export/mordashka.tgz HTTP/1.1\" 304 - \"-\" \"libwww-perl/5.805\" \"news.yandex.ru,80\" \"-\" \"-\" 1219867687 \"0\" 3283 2"; + const TString s = "77.88.58.91 - - [28/Aug/2008:00:08:07 +0400] \"GET /export/mordashka.tgz HTTP/1.1\" 304 - \"-\" \"libwww-perl/5.805\" \"news.yandex.ru,80\" \"-\" \"-\" 1219867687 \"0\" 3283 2"; const TSplitDelimiters delims(" "); const TSplitDelimiters screens("\"[]"); const TScreenedDelimitersSplit splitter(s.Data(), s.Size(), delims, screens); @@ -138,7 +138,7 @@ void TSplitIteratorTest::TestScreenedDelimitersSplit() { } void TSplitIteratorTest::TestSubstringDelimiter() { - const TString s = "a@@bb@@cc@c.d@@r"; + const TString s = "a@@bb@@cc@c.d@@r"; static const TSubstringSplitDelimiter delimiter("@@"); const TSubstringSplit splitter(s, delimiter); TSubstringSplit::TIterator it = splitter.Iterator(); diff --git a/library/cpp/deprecated/split/ya.make b/library/cpp/deprecated/split/ya.make index 946e685ac8..fbe94578b7 100644 --- a/library/cpp/deprecated/split/ya.make +++ b/library/cpp/deprecated/split/ya.make @@ -7,8 +7,8 @@ SRCS( split_iterator.cpp ) -PEERDIR( +PEERDIR( library/cpp/deprecated/kmp -) - +) + END() diff --git a/library/cpp/deprecated/ya.make b/library/cpp/deprecated/ya.make index 6c753f68a9..35d16e9cd8 100644 --- a/library/cpp/deprecated/ya.make +++ b/library/cpp/deprecated/ya.make @@ -18,8 +18,8 @@ RECURSE( ipreg1/ut_full ipreg1/util iter - kmp - kmp/ut + kmp + kmp/ut mapped_file mapped_file/ut mbitmap @@ -37,8 +37,8 @@ RECURSE( datawork/conf calc_module iterators_heap - parse_utils - parse_utils/ut + parse_utils + parse_utils/ut small_array solartrie solartrie/indexed_region/ut |