diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-04 11:11:38 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-04 11:11:38 +0000 |
commit | 6547f93cad0868da00a4e9e4d4dc63b26726653b (patch) | |
tree | f6a1ecd48d58a29cbb921167cb15a80aad1a1d21 /library/cpp | |
parent | e55564f7a0a0ff7b638ce199c1b5005b696d349d (diff) | |
parent | 5d32f79de3c53b2eaebca9be84a7399d479f8549 (diff) | |
download | ydb-6547f93cad0868da00a4e9e4d4dc63b26726653b.tar.gz |
Merge branch 'rightlib' into mergelibs-241004-1110
Diffstat (limited to 'library/cpp')
25 files changed, 47 insertions, 46 deletions
diff --git a/library/cpp/codecs/solar_codec.cpp b/library/cpp/codecs/solar_codec.cpp index 916bbbd5d1..f894b89ada 100644 --- a/library/cpp/codecs/solar_codec.cpp +++ b/library/cpp/codecs/solar_codec.cpp @@ -49,7 +49,7 @@ namespace NCodecs { tmp.reserve(set->size()); for (const auto& it : *set) { - Y_ENSURE(it.Str.Size() <= maxlen); + Y_ENSURE(it.Str.size() <= maxlen); tmp.push_back(std::make_pair(-it.Score, it.Str)); } diff --git a/library/cpp/codecs/ut/codecs_ut.cpp b/library/cpp/codecs/ut/codecs_ut.cpp index 9b985cb774..01901c4477 100644 --- a/library/cpp/codecs/ut/codecs_ut.cpp +++ b/library/cpp/codecs/ut/codecs_ut.cpp @@ -881,7 +881,7 @@ private: sout << " != \n"; sout << HexEncode(test.data(), test.size()); //NEscJ::EscapeJ<true>(test, sout); - if (s.Size() > 1536) { + if (s.size() > 1536) { TString res = s.substr(0, 512); res.append("...<skipped ").append(ToString(s.size() - 1024)).append(">..."); res.append(s.substr(s.size() - 512)); diff --git a/library/cpp/codecs/ut/tls_cache_ut.cpp b/library/cpp/codecs/ut/tls_cache_ut.cpp index 8e808cfadb..aed834101a 100644 --- a/library/cpp/codecs/ut/tls_cache_ut.cpp +++ b/library/cpp/codecs/ut/tls_cache_ut.cpp @@ -27,7 +27,7 @@ Y_UNIT_TEST(TestAcquireReleaseReuse) { // expecting it zero sized but having the same memory auto buf2 = factory.Item(); UNIT_ASSERT_VALUES_EQUAL(buf2.Get().Size(), 0u); - buf2.Get().Resize(TStringBuf("Buffer_02").Size()); + buf2.Get().Resize(TStringBuf("Buffer_02").size()); UNIT_ASSERT_EQUAL(AsStringBuf(buf2.Get()), "Buffer_02"); } // when the factory dies we should see no leaks diff --git a/library/cpp/colorizer/ut/colorizer_ut.cpp b/library/cpp/colorizer/ut/colorizer_ut.cpp index 20341440af..2512651861 100644 --- a/library/cpp/colorizer/ut/colorizer_ut.cpp +++ b/library/cpp/colorizer/ut/colorizer_ut.cpp @@ -12,7 +12,7 @@ Y_UNIT_TEST_SUITE(ColorizerTest) { UNIT_ASSERT_STRINGS_EQUAL(EscapeC(colors.BlueColor()), "\\x1B[22;34m"); UNIT_ASSERT_STRINGS_EQUAL(EscapeC(colors.ForeBlue()), "\\x1B[34m"); colors.Disable(); - UNIT_ASSERT(colors.BlueColor().Empty()); + UNIT_ASSERT(colors.BlueColor().empty()); } Y_UNIT_TEST(ResettingTest) { diff --git a/library/cpp/containers/comptrie/comptrie_ut.cpp b/library/cpp/containers/comptrie/comptrie_ut.cpp index 74bee09b5d..8d2ddc83bc 100644 --- a/library/cpp/containers/comptrie/comptrie_ut.cpp +++ b/library/cpp/containers/comptrie/comptrie_ut.cpp @@ -1483,7 +1483,7 @@ void TCompactTrieTest::TestBuilderFindLongestPrefix(size_t keysCount, double bra TVector<TString> keys; TString keyToAdd; for (size_t i = 0; i < keysCount; ++i) { - const size_t prevKeyLen = keyToAdd.Size(); + const size_t prevKeyLen = keyToAdd.size(); // add two random chars to prev key keyToAdd += RandChar(); keyToAdd += RandChar(); @@ -1517,8 +1517,8 @@ void TCompactTrieTest::TestBuilderFindLongestPrefix(size_t keysCount, double bra } else { size_t max = 0; for (size_t k = 0; k < i; ++k) - if (keys[k].Size() < otherKey.Size() && keys[k].Size() > max && otherKey.StartsWith(keys[k])) - max = keys[k].Size(); + if (keys[k].size() < otherKey.size() && keys[k].size() > max && otherKey.StartsWith(keys[k])) + max = keys[k].size(); expectedSize = max; } @@ -1621,11 +1621,11 @@ void TCompactTrieTest::TestPatternSearcherOnDataset( size_t matchesNum = 0; THashSet<TString> processedPatterns; for (const auto& pattern : patterns) { - if (pattern.Empty() || processedPatterns.contains(pattern)) { + if (pattern.empty() || processedPatterns.contains(pattern)) { continue; } - for (size_t start = 0; start + pattern.Size() <= sample.Size(); ++start) { - matchesNum += (pattern == sample.substr(start, pattern.Size())); + for (size_t start = 0; start + pattern.size() <= sample.size(); ++start) { + matchesNum += (pattern == sample.substr(start, pattern.size())); } processedPatterns.insert(pattern); } @@ -1760,7 +1760,7 @@ void TCompactTrieTest::TestPatternSearcherRandom( patterns.push_back(RandStr(rng, patternMaxLength, maxChar, /*nonEmpty*/true)); } - auto filler = RandStr(rng, strMaxLength - patternToSearch.Size() + 1, maxChar); + auto filler = RandStr(rng, strMaxLength - patternToSearch.size() + 1, maxChar); size_t leftFillerSize = rng.GenRand() % (filler.size() + 1); auto leftFiller = filler.substr(0, leftFillerSize); auto rightFiller = filler.substr(leftFillerSize, filler.size() - leftFillerSize); diff --git a/library/cpp/deprecated/split/split_iterator_ut.cpp b/library/cpp/deprecated/split/split_iterator_ut.cpp index be5069c4be..6f17e636aa 100644 --- a/library/cpp/deprecated/split/split_iterator_ut.cpp +++ b/library/cpp/deprecated/split/split_iterator_ut.cpp @@ -116,7 +116,7 @@ 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 TSplitDelimiters delims(" "); const TSplitDelimiters screens("\"[]"); - const TScreenedDelimitersSplit splitter(s.Data(), s.Size(), delims, screens); + const TScreenedDelimitersSplit splitter(s.data(), s.size(), delims, screens); TScreenedDelimitersSplit::TIterator it = splitter.Iterator(); UNIT_ASSERT_EQUAL(it.NextString(), "77.88.58.91"); UNIT_ASSERT_EQUAL(it.NextString(), "-"); diff --git a/library/cpp/messagebus/www/www.cpp b/library/cpp/messagebus/www/www.cpp index 9c3e0f522d..f6b3289702 100644 --- a/library/cpp/messagebus/www/www.cpp +++ b/library/cpp/messagebus/www/www.cpp @@ -717,7 +717,7 @@ struct TBusWww::TImpl { os << HTTP_OK_BIN; } auto blob = NResource::Find(TString("/") + TString(path)); - os.Write(blob.Data(), blob.Size()); + os.Write(blob.data(), blob.size()); } void HeaderJsCss() { diff --git a/library/cpp/monlib/encode/json/json_encoder.cpp b/library/cpp/monlib/encode/json/json_encoder.cpp index 20d2bb6283..69da5170f0 100644 --- a/library/cpp/monlib/encode/json/json_encoder.cpp +++ b/library/cpp/monlib/encode/json/json_encoder.cpp @@ -198,7 +198,7 @@ namespace NMonitoring { if (Style_ != EJsonStyle::Cloud) { return; } - if (CurrentMetricName_.Empty()) { + if (CurrentMetricName_.empty()) { ythrow yexception() << "label '" << MetricNameLabel_ << "' is not defined"; } Buf_.WriteKey("name"); diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp index 313651ba8f..16a08f4781 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp @@ -219,7 +219,7 @@ namespace NMonitoring { private: bool HasRemaining() const noexcept { - return CurrentPos_ < Data_.Size(); + return CurrentPos_ < Data_.size(); } // # 'TYPE' metric_name {counter|gauge|histogram|summary|untyped} @@ -234,7 +234,7 @@ namespace NMonitoring { SkipSpaces(); TStringBuf nextName = ReadTokenAsMetricName(); - Y_PARSER_ENSURE(!nextName.Empty(), "invalid metric name"); + Y_PARSER_ENSURE(!nextName.empty(), "invalid metric name"); SkipSpaces(); EPrometheusMetricType nextType = ReadType(); diff --git a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp index fc482a4570..0c6c23c466 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp @@ -106,7 +106,7 @@ namespace NMonitoring { private: // will replace invalid chars with '_' void WriteMetricName(TStringBuf name) { - Y_ENSURE(!name.Empty(), "trying to write metric with empty name"); + Y_ENSURE(!name.empty(), "trying to write metric with empty name"); char ch = name[0]; if (!NPrometheus::IsValidMetricNameStart(ch)) { @@ -131,7 +131,7 @@ namespace NMonitoring { WriteLabelValue(l.Value()); Out_->Write(", "); // trailign comma is supported in parsers } - if (!addLabelKey.Empty() && !addLabelValue.Empty()) { + if (!addLabelKey.empty() && !addLabelValue.empty()) { Out_->Write(addLabelKey); Out_->Write('='); WriteLabelValue(addLabelValue); @@ -162,12 +162,12 @@ namespace NMonitoring { { // (1) name WriteMetricName(name); - if (!suffix.Empty()) { + if (!suffix.empty()) { Out_->Write(suffix); } // (2) labels - if (!labels.Empty() || !addLabelKey.Empty()) { + if (!labels.Empty() || !addLabelKey.empty()) { WriteLabels(labels, addLabelKey, addLabelValue); } Out_->Write(' '); diff --git a/library/cpp/monlib/encode/spack/spack_v1_encoder.cpp b/library/cpp/monlib/encode/spack/spack_v1_encoder.cpp index a2b0bb5f50..7e13c3292b 100644 --- a/library/cpp/monlib/encode/spack/spack_v1_encoder.cpp +++ b/library/cpp/monlib/encode/spack/spack_v1_encoder.cpp @@ -312,7 +312,7 @@ namespace NMonitoring { EMetricsMergingMode mergingMode, TStringBuf metricNameLabel ) { - Y_ENSURE(!metricNameLabel.Empty(), "metricNameLabel can't be empty"); + Y_ENSURE(!metricNameLabel.empty(), "metricNameLabel can't be empty"); return MakeHolder<TEncoderSpackV1>(out, timePrecision, compression, mergingMode, SV1_02, metricNameLabel); } } diff --git a/library/cpp/monlib/metrics/labels.cpp b/library/cpp/monlib/metrics/labels.cpp index 1eaadb7cba..f1210f54ed 100644 --- a/library/cpp/monlib/metrics/labels.cpp +++ b/library/cpp/monlib/metrics/labels.cpp @@ -35,7 +35,7 @@ Y_MONLIB_DEFINE_LABEL_OUT(NMonitoring::TLabel); namespace NMonitoring { bool TryLoadLabelsFromString(TStringBuf sb, ILabels& labels) { - if (sb.Empty()) { + if (sb.empty()) { return false; } @@ -46,7 +46,7 @@ namespace NMonitoring { sb.Skip(1); sb.Chop(1); - if (sb.Empty()) { + if (sb.empty()) { return true; } diff --git a/library/cpp/neh/http_headers.h b/library/cpp/neh/http_headers.h index 70cf3a9fbe..e3c9867d06 100644 --- a/library/cpp/neh/http_headers.h +++ b/library/cpp/neh/http_headers.h @@ -24,7 +24,7 @@ namespace NNeh { bool Next(TStringBuf& header) { while (Headers_.ReadLine(header)) { - if (!header.Empty()) { + if (!header.empty()) { return true; } } diff --git a/library/cpp/regex/pcre/benchmark/main.cpp b/library/cpp/regex/pcre/benchmark/main.cpp index 3c11ef4f29..4899dcc8f5 100644 --- a/library/cpp/regex/pcre/benchmark/main.cpp +++ b/library/cpp/regex/pcre/benchmark/main.cpp @@ -17,19 +17,19 @@ static TVector<TString> GenerateHaystacks() { // Generate long randomized haystacks to prevent cache hit TVector<TString> result(Reserve(HaystacksCount)); for (size_t i = 0; i < HaystacksCount; ++i) { - result.push_back(TString::Join(ComplexPattern.SubString(MinPrefix + i, ComplexPattern.Size() - MinPrefix - i), ComplexPattern.SubString(0, MinPrefix + i))); + result.push_back(TString::Join(ComplexPattern.SubString(MinPrefix + i, ComplexPattern.size() - MinPrefix - i), ComplexPattern.SubString(0, MinPrefix + i))); } return result; } static const TVector<TString> Haystacks{GenerateHaystacks()}; -static const NPcre::TPcre<char> Simple{SimplePattern.Data()}; -static const NPcre::TPcre<char> SimpleStudy{SimplePattern.Data(), NPcre::EOptimize::Study}; -static const NPcre::TPcre<char> SimpleJIT{SimplePattern.Data(), NPcre::EOptimize::JIT}; -static const NPcre::TPcre<char> Complex{ComplexPattern.Data()}; -static const NPcre::TPcre<char> ComplexStudy{ComplexPattern.Data(), NPcre::EOptimize::Study}; -static const NPcre::TPcre<char> ComplexJIT{ComplexPattern.Data(), NPcre::EOptimize::JIT}; +static const NPcre::TPcre<char> Simple{SimplePattern.data()}; +static const NPcre::TPcre<char> SimpleStudy{SimplePattern.data(), NPcre::EOptimize::Study}; +static const NPcre::TPcre<char> SimpleJIT{SimplePattern.data(), NPcre::EOptimize::JIT}; +static const NPcre::TPcre<char> Complex{ComplexPattern.data()}; +static const NPcre::TPcre<char> ComplexStudy{ComplexPattern.data(), NPcre::EOptimize::Study}; +static const NPcre::TPcre<char> ComplexJIT{ComplexPattern.data(), NPcre::EOptimize::JIT}; static void Benchmark(benchmark::State& state, const NPcre::TPcre<char>& pattern) { for (auto _ : state) { diff --git a/library/cpp/regex/pcre/pcre.h b/library/cpp/regex/pcre/pcre.h index 82a9774f00..15a25689db 100644 --- a/library/cpp/regex/pcre/pcre.h +++ b/library/cpp/regex/pcre/pcre.h @@ -102,7 +102,7 @@ namespace NPcre { Y_ASSERT(workspaceSize >= 0); size_t ovecsize = workspaceSize * 3; NStackArray::TStackArray<int> ovector(ALLOC_ON_STACK(int, ovecsize)); - return ConvertReturnCode(TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.Data(), string.Size(), 0, executeFlags, ovector.data(), ovecsize)); + return ConvertReturnCode(TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.data(), string.size(), 0, executeFlags, ovector.data(), ovecsize)); } //! Find compiled pattern in string. @@ -123,7 +123,7 @@ namespace NPcre { for (size_t i = 0; i < ovecsize; ++i) { ovector[i] = -4; } - int rc = TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.Data(), string.Size(), 0, executeFlags, ovector.data(), ovecsize); + int rc = TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.data(), string.size(), 0, executeFlags, ovector.data(), ovecsize); if (ConvertReturnCode(rc)) { return MakeMaybe<TPcreMatch>(ovector[0], ovector[1]); } else { @@ -153,7 +153,7 @@ namespace NPcre { size_t ovecsize = (initialWorkspaceSize + 1) * 3; while (true) { NStackArray::TStackArray<int> ovector(ALLOC_ON_STACK(int, ovecsize)); - int rc = TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.Data(), string.Size(), 0, executeFlags, ovector.data(), ovecsize); + int rc = TTraits::Exec(Code.Get(), Extra.Get(), (TStringType) string.data(), string.size(), 0, executeFlags, ovector.data(), ovecsize); if (rc > 0) { TPcreMatches result(Reserve(rc >> 1)); for (int i = 0, pos = 0; i < rc; ++i) { diff --git a/library/cpp/streams/lz/lz_ut.cpp b/library/cpp/streams/lz/lz_ut.cpp index 17df533225..dfa88f9b6b 100644 --- a/library/cpp/streams/lz/lz_ut.cpp +++ b/library/cpp/streams/lz/lz_ut.cpp @@ -292,7 +292,7 @@ Y_UNIT_TEST_SUITE(TLzTest) { Y_UNIT_TEST(TestYQ609) { auto data = NResource::Find("/yq_609.data"); - TMemoryInput input(data.Data(), data.Size()); + TMemoryInput input(data.data(), data.size()); TLz4Decompress d(&input); UNIT_ASSERT_EXCEPTION(d.ReadAll(), TDecompressorError); diff --git a/library/cpp/string_utils/base64/base64_ut.cpp b/library/cpp/string_utils/base64/base64_ut.cpp index f10afa9747..df7ffd37e8 100644 --- a/library/cpp/string_utils/base64/base64_ut.cpp +++ b/library/cpp/string_utils/base64/base64_ut.cpp @@ -537,7 +537,7 @@ Y_UNIT_TEST_SUITE(TBase64) { Y_UNIT_TEST(TestDecodeUnevenDst) { const auto x = "How do I convert between big-endian and little-endian values in C++?aa"; TString b64 = "SG93IGRvIEkgY29udmVydCBiZXR3ZWVuIGJpZy1lbmRpYW4gYW5kIGxpdHRsZS1lbmRpYW4gdmFsdWVzIGluIEMrKz9hYQ"; - TVector<char> buf(Base64DecodeBufSize(b64.Size()), '\0'); + TVector<char> buf(Base64DecodeBufSize(b64.size()), '\0'); Base64DecodeUneven(buf.begin(), b64); TString res(buf.data()); UNIT_ASSERT_VALUES_EQUAL(x, res); @@ -546,7 +546,7 @@ Y_UNIT_TEST_SUITE(TBase64) { Y_UNIT_TEST(TestDecodeUnevenDst2) { const auto x = "How do I convert between big-endian and little-endian values in C++?"; TString b64 = "SG93IGRvIEkgY29udmVydCBiZXR3ZWVuIGJpZy1lbmRpYW4gYW5kIGxpdHRsZS1lbmRpYW4gdmFsdWVzIGluIEMrKz8"; - TVector<char> buf(Base64DecodeBufSize(b64.Size()), '\0'); + TVector<char> buf(Base64DecodeBufSize(b64.size()), '\0'); Base64DecodeUneven(buf.begin(), b64); TString res(buf.data()); UNIT_ASSERT_VALUES_EQUAL(x, res); diff --git a/library/cpp/type_info/type_factory.h b/library/cpp/type_info/type_factory.h index 1d21094355..567a164235 100644 --- a/library/cpp/type_info/type_factory.h +++ b/library/cpp/type_info/type_factory.h @@ -439,7 +439,7 @@ namespace NTi { /// Reclaim a chunk of memory memory that was allocated via the `AllocateString` function. virtual void FreeString(TStringBuf str) noexcept { - Free(const_cast<char*>(str.Data())); + Free(const_cast<char*>(str.data())); } /// Like `AllocateString`, but works with `TMaybe<TStringBuf>`. diff --git a/library/cpp/type_info/ut/test_data.cpp b/library/cpp/type_info/ut/test_data.cpp index 36944e7bc4..7842e86c2e 100644 --- a/library/cpp/type_info/ut/test_data.cpp +++ b/library/cpp/type_info/ut/test_data.cpp @@ -25,7 +25,7 @@ std::vector<std::vector<TString>> ParseData(TStringBuf data, int expectedFieldsC std::vector<std::vector<TString>> result; for (TStringBuf record : StringSplitter(noComments).SplitByString(";;")) { record = StripString(record); - if (record.Empty()) { + if (record.empty()) { continue; } std::vector<TString> fields; @@ -88,4 +88,5 @@ TEST(TestData, BadTypes) { exceptionMessage, context); } -}
\ No newline at end of file +} + diff --git a/library/cpp/uri/uri_ut.cpp b/library/cpp/uri/uri_ut.cpp index 1198140ce9..934ec2174b 100644 --- a/library/cpp/uri/uri_ut.cpp +++ b/library/cpp/uri/uri_ut.cpp @@ -840,7 +840,7 @@ namespace NUri { uri.Parse("http://srv.net:80/print", TFeature::FeaturesRecommended); TString s = uri.PrintS(TUri::FlagPort); Cdbg << uri.PrintS() << ',' << uri.PrintS(TUri::FlagPort) << Endl; - UNIT_ASSERT(s.Empty()); + UNIT_ASSERT(s.empty()); } } diff --git a/library/cpp/xml/document/node-attr.h b/library/cpp/xml/document/node-attr.h index 6e74403943..1378ffdfbf 100644 --- a/library/cpp/xml/document/node-attr.h +++ b/library/cpp/xml/document/node-attr.h @@ -111,7 +111,7 @@ namespace NXml { inline void TNode::SetValue(TStringBuf value) { xmlNodeSetContent(NodePointer, XMLCHAR("")); - xmlNodeAddContentLen(NodePointer, XMLCHAR(value.data()), value.Size()); + xmlNodeAddContentLen(NodePointer, XMLCHAR(value.data()), value.size()); } inline void TNode::SetAttr(TZtStringBuf name, TZtStringBuf value) { diff --git a/library/cpp/yt/backtrace/symbolizers/dwarf/dwarf_symbolizer.cpp b/library/cpp/yt/backtrace/symbolizers/dwarf/dwarf_symbolizer.cpp index f5d02aaa33..e95d920f18 100644 --- a/library/cpp/yt/backtrace/symbolizers/dwarf/dwarf_symbolizer.cpp +++ b/library/cpp/yt/backtrace/symbolizers/dwarf/dwarf_symbolizer.cpp @@ -22,7 +22,7 @@ void SymbolizeBacktrace( formatter.AppendNumber(info.Address, 16, width, '0'); formatter.AppendString(" in "); formatter.AppendString(info.FunctionName); - const int bytesToAppendEstimate = 4 + info.FileName.Size() + 1 + 4 /* who cares about line numbers > 9999 */ + 1; + const int bytesToAppendEstimate = 4 + info.FileName.size() + 1 + 4 /* who cares about line numbers > 9999 */ + 1; if (formatter.GetBytesRemaining() < bytesToAppendEstimate) { const int offset = formatter.GetBytesRemaining() - bytesToAppendEstimate; if (formatter.GetBytesWritten() + offset >= 0) { diff --git a/library/cpp/yt/farmhash/farm_hash.h b/library/cpp/yt/farmhash/farm_hash.h index fe4c8193a0..f233bc0c92 100644 --- a/library/cpp/yt/farmhash/farm_hash.h +++ b/library/cpp/yt/farmhash/farm_hash.h @@ -39,7 +39,7 @@ static inline TFingerprint FarmFingerprint(const void* buf, size_t len) static inline TFingerprint FarmFingerprint(TStringBuf buf) { - return FarmFingerprint(buf.Data(), buf.Size()); + return FarmFingerprint(buf.data(), buf.size()); } static inline TFingerprint FarmFingerprint(ui64 first, ui64 second) diff --git a/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp b/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp index 55f9f9945a..736470653b 100644 --- a/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp +++ b/library/cpp/yt/memory/unittests/chunked_memory_pool_ut.cpp @@ -23,7 +23,7 @@ TEST(TChunkedMemoryPoolTest, Absorb) auto fillPool = [&] (TChunkedMemoryPool& pool, TString prefix, int count) { for (int i = 0; i < count; i++) { TString expected = prefix + ToString(count); - char* buf = pool.AllocateUnaligned(expected.Size()); + char* buf = pool.AllocateUnaligned(expected.size()); ::memcpy(buf, expected.c_str(), expected.size()); TStringBuf ref(buf, buf + expected.size()); totalSize += expected.size(); diff --git a/library/cpp/yt/yson_string/string.cpp b/library/cpp/yt/yson_string/string.cpp index ed2990a51b..45a6aa7f09 100644 --- a/library/cpp/yt/yson_string/string.cpp +++ b/library/cpp/yt/yson_string/string.cpp @@ -75,7 +75,7 @@ TYsonString::TYsonString(const TYsonStringBuf& ysonStringBuf) auto holder = NDetail::TYsonStringHolder::Allocate(data.length()); ::memcpy(holder->GetData(), data.data(), data.length()); Begin_ = holder->GetData(); - Size_ = data.Size(); + Size_ = data.size(); Type_ = ysonStringBuf.GetType(); Payload_ = std::move(holder); } else { |