aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-11-06 09:43:33 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-11-06 09:55:58 +0300
commit6c3456e031c02cece9a774db8150adf1485f94ad (patch)
tree8da06430b11b34c111ad47118da65c954c005904
parent9c2fb2d10e3855cb69704333fe62efbe9d47ad93 (diff)
downloadydb-6c3456e031c02cece9a774db8150adf1485f94ad.tar.gz
Remove methods Data, Size, Empty from TString
If this pr has broken something, try using the methods named with a small letter \[nodiff:caesar\] commit_hash:c08a737938cff39577c6e47d4434531f6355e4c2
-rw-r--r--util/generic/string.h4
-rw-r--r--yql/essentials/public/udf/udf_string.h3
-rw-r--r--yql/essentials/public/udf/udf_string_ref.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/util/generic/string.h b/util/generic/string.h
index d371ec9ce3..fa7d055adc 100644
--- a/util/generic/string.h
+++ b/util/generic/string.h
@@ -1197,6 +1197,10 @@ public:
bool to_upper(size_t pos = 0, size_t n = TBase::npos);
bool to_title(size_t pos = 0, size_t n = TBase::npos);
+ constexpr const TCharType* Data() const noexcept = delete;
+ constexpr size_t Size() noexcept = delete;
+ Y_PURE_FUNCTION constexpr bool Empty() const noexcept = delete;
+
public:
/**
* Modifies the substring of length `n` starting from `pos`, applying `f` to each position and symbol.
diff --git a/yql/essentials/public/udf/udf_string.h b/yql/essentials/public/udf/udf_string.h
index 58d7386629..72b2c34762 100644
--- a/yql/essentials/public/udf/udf_string.h
+++ b/yql/essentials/public/udf/udf_string.h
@@ -138,6 +138,9 @@ public:
inline ui32 Size() const { return Data_->Size(); }
inline char* Data() const { return Data_->Data(); }
+ inline ui32 size() const { return Data_->Size(); }
+ inline char* data() const { return Data_->Data(); }
+
inline void Ref() {
if (Data_ != nullptr) {
Data_->Ref();
diff --git a/yql/essentials/public/udf/udf_string_ref.h b/yql/essentials/public/udf/udf_string_ref.h
index 9c42ee46c4..cee321a8b6 100644
--- a/yql/essentials/public/udf/udf_string_ref.h
+++ b/yql/essentials/public/udf/udf_string_ref.h
@@ -148,14 +148,14 @@ private:
template<typename TStringType>
struct TByData {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.Data();
+ return buf.data();
}
};
template<typename TStringType>
struct TBySize {
static constexpr auto Get(const TStringType& buf) noexcept {
- return buf.Size();
+ return buf.size();
}
};