Browse Source

YT: Use TYPathBuf in tokenizer
b290e7183e5c7b7bb3cb30e7a49fc2712b178ec1

dgolear 7 months ago
parent
commit
85aca7c81e
3 changed files with 6 additions and 6 deletions
  1. 1 1
      yt/yt/core/ypath/stack.h
  2. 1 1
      yt/yt/core/ypath/tokenizer.cpp
  3. 4 4
      yt/yt/core/ypath/tokenizer.h

+ 1 - 1
yt/yt/core/ypath/stack.h

@@ -33,7 +33,7 @@ public:
 
 
 private:
 private:
     std::vector<size_t> PreviousPathLengths_;
     std::vector<size_t> PreviousPathLengths_;
-    TString Path_;
+    TYPath Path_;
 
 
     static TString ToString(const TEntry& entry);
     static TString ToString(const TEntry& entry);
 };
 };

+ 1 - 1
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 fullTokenizer(fullPath);
     TTokenizer prefixTokenizer(prefixPath);
     TTokenizer prefixTokenizer(prefixPath);

+ 4 - 4
yt/yt/core/ypath/tokenizer.h

@@ -24,11 +24,11 @@ public:
     ETokenType GetType() const;
     ETokenType GetType() const;
     ETokenType GetPreviousType() const;
     ETokenType GetPreviousType() const;
     TStringBuf GetToken() const;
     TStringBuf GetToken() const;
-    TStringBuf GetPrefix() const;
-    TStringBuf GetPrefixPlusToken() const;
+    TYPathBuf GetPrefix() const;
+    TYPathBuf GetPrefixPlusToken() const;
     TStringBuf GetSuffix() const;
     TStringBuf GetSuffix() const;
     TStringBuf GetInput() const;
     TStringBuf GetInput() const;
-    TStringBuf GetPath() const;
+    TYPathBuf GetPath() const;
     const TString& GetLiteralValue() const;
     const TString& GetLiteralValue() const;
 
 
     void Expect(ETokenType expectedType) 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);
 
 
 ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////