aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder
diff options
context:
space:
mode:
authorswarmer <swarmer@yandex-team.com>2024-08-07 00:19:42 +0300
committerswarmer <swarmer@yandex-team.com>2024-08-07 00:37:37 +0300
commita9c8987363503f0d434be8b1e7b494be65a2b477 (patch)
tree2338479c494ab77779f71c5fcb0e6810b3dcc52c /util/folder
parentcdaa807d2e96e0b0b8560eddf04d8f31a607c9ff (diff)
downloadydb-a9c8987363503f0d434be8b1e7b494be65a2b477.tar.gz
check the lifetime of various algorithms that return a substring of the input TStringBuf view
e778480cb05d20fe1a3fbf5ff69858c8912ed2d6
Diffstat (limited to 'util/folder')
-rw-r--r--util/folder/pathsplit.cpp2
-rw-r--r--util/folder/pathsplit.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/util/folder/pathsplit.cpp b/util/folder/pathsplit.cpp
index 816f696024..fd002b143a 100644
--- a/util/folder/pathsplit.cpp
+++ b/util/folder/pathsplit.cpp
@@ -132,7 +132,7 @@ TString JoinPaths(const TPathSplit& p1, const TPathSplit& p2) {
return TPathSplit(p1).AppendMany(p2.begin(), p2.end()).Reconstruct();
}
-TStringBuf CutExtension(const TStringBuf fileName) {
+TStringBuf CutExtension(const TStringBuf fileName Y_LIFETIME_BOUND) {
if (fileName.empty()) {
return fileName;
}
diff --git a/util/folder/pathsplit.h b/util/folder/pathsplit.h
index d134338e35..135457dbd0 100644
--- a/util/folder/pathsplit.h
+++ b/util/folder/pathsplit.h
@@ -110,4 +110,4 @@ using TPathSplitWindows = TPathSplitBase<TPathSplitTraitsWindows>;
TString JoinPaths(const TPathSplit& p1, const TPathSplit& p2);
-TStringBuf CutExtension(const TStringBuf fileName);
+TStringBuf CutExtension(const TStringBuf fileName Y_LIFETIME_BOUND);