aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgolear <dgolear@yandex-team.com>2024-07-21 19:47:12 +0300
committerdgolear <dgolear@yandex-team.com>2024-07-21 20:00:06 +0300
commit85aca7c81e525e43b47a6d5ec9462f6ccd2103fa (patch)
tree956280f1166b4f1b3e51a5917b6c3e9bff80bbca
parent01ca96da35fb638afb713db029009a97d87eed87 (diff)
downloadydb-85aca7c81e525e43b47a6d5ec9462f6ccd2103fa.tar.gz
YT: Use TYPathBuf in tokenizer
b290e7183e5c7b7bb3cb30e7a49fc2712b178ec1
-rw-r--r--yt/yt/core/ypath/stack.h2
-rw-r--r--yt/yt/core/ypath/tokenizer.cpp2
-rw-r--r--yt/yt/core/ypath/tokenizer.h8
3 files changed, 6 insertions, 6 deletions
diff --git a/yt/yt/core/ypath/stack.h b/yt/yt/core/ypath/stack.h
index e5b40f2be7..fd09310d1d 100644
--- a/yt/yt/core/ypath/stack.h
+++ b/yt/yt/core/ypath/stack.h
@@ -33,7 +33,7 @@ public:
private:
std::vector<size_t> PreviousPathLengths_;
- TString Path_;
+ TYPath Path_;
static TString ToString(const TEntry& entry);
};
diff --git a/yt/yt/core/ypath/tokenizer.cpp b/yt/yt/core/ypath/tokenizer.cpp
index 6079747cfb..0b64f82761 100644
--- a/yt/yt/core/ypath/tokenizer.cpp
+++ b/yt/yt/core/ypath/tokenizer.cpp
@@ -274,7 +274,7 @@ TTokenizer::TCheckpoint::~TCheckpoint()
////////////////////////////////////////////////////////////////////////////////
-bool HasPrefix(const TYPath& fullPath, const TYPath& prefixPath)
+bool HasPrefix(TYPathBuf fullPath, TYPathBuf prefixPath)
{
TTokenizer fullTokenizer(fullPath);
TTokenizer prefixTokenizer(prefixPath);
diff --git a/yt/yt/core/ypath/tokenizer.h b/yt/yt/core/ypath/tokenizer.h
index 57b714a580..6485d2565a 100644
--- a/yt/yt/core/ypath/tokenizer.h
+++ b/yt/yt/core/ypath/tokenizer.h
@@ -24,11 +24,11 @@ public:
ETokenType GetType() const;
ETokenType GetPreviousType() const;
TStringBuf GetToken() const;
- TStringBuf GetPrefix() const;
- TStringBuf GetPrefixPlusToken() const;
+ TYPathBuf GetPrefix() const;
+ TYPathBuf GetPrefixPlusToken() const;
TStringBuf GetSuffix() const;
TStringBuf GetInput() const;
- TStringBuf GetPath() const;
+ TYPathBuf GetPath() const;
const TString& GetLiteralValue() const;
void Expect(ETokenType expectedType) const;
@@ -71,7 +71,7 @@ private:
////////////////////////////////////////////////////////////////////////////////
-bool HasPrefix(const TYPath& fullPath, const TYPath& prefixPath);
+bool HasPrefix(TYPathBuf fullPath, TYPathBuf prefixPath);
////////////////////////////////////////////////////////////////////////////////