aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-19 04:55:43 +0300
committertobo <tobo@yandex-team.ru>2022-02-19 04:55:43 +0300
commitac7edc66fd1503d44744fedde420ad08cdebd1a9 (patch)
treea83477758c66f33486ab05423efe220668d20827
parent32b10e0c2cc6ea8c518449d9daf3f86bf5a087eb (diff)
downloadydb-ac7edc66fd1503d44744fedde420ad08cdebd1a9.tar.gz
pass string by reference, rm unused include
ref:b2a9abb354b18c7a8d339a26c1e23fba39e48c06
-rw-r--r--util/system/fs.cpp3
-rw-r--r--util/system/fs.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/util/system/fs.cpp b/util/system/fs.cpp
index d2611a8ccc..b848abac8a 100644
--- a/util/system/fs.cpp
+++ b/util/system/fs.cpp
@@ -11,7 +11,6 @@
#include <util/generic/yexception.h>
#include <util/memory/tempbuf.h>
#include <util/stream/file.h>
-#include <util/charset/wide.h>
#include <util/folder/iterator.h>
#include <util/system/fstat.h>
#include <util/folder/path.h>
@@ -167,7 +166,7 @@ TString NFs::CurrentWorkingDirectory() {
#endif
}
-void NFs::SetCurrentWorkingDirectory(TString path) {
+void NFs::SetCurrentWorkingDirectory(const TString& path) {
#ifdef _win_
bool ok = NFsPrivate::WinSetCurrentWorkingDirectory(path);
#else
diff --git a/util/system/fs.h b/util/system/fs.h
index 237daf2d2d..80f0a295c8 100644
--- a/util/system/fs.h
+++ b/util/system/fs.h
@@ -136,7 +136,7 @@ namespace NFs {
///
/// @param[in] path Path for new cwd
/// Note: is not threadsafe
- void SetCurrentWorkingDirectory(TString path);
+ void SetCurrentWorkingDirectory(const TString& path);
/// Checks if file exists
///