mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 05:00:15 +00:00
Merge pull request #902 from gaul/clang-tidy/pass-by-value
Avoid pass-by-value when not necessary
This commit is contained in:
commit
34c3bfe408
@ -472,7 +472,7 @@ bool StatCache::AddNoObjectCache(string& key)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatCache::ChangeNoTruncateFlag(std::string key, bool no_truncate)
|
void StatCache::ChangeNoTruncateFlag(const std::string& key, bool no_truncate)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&StatCache::stat_cache_lock);
|
pthread_mutex_lock(&StatCache::stat_cache_lock);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ class StatCache
|
|||||||
bool AddStat(std::string& key, headers_t& meta, bool forcedir = false, bool no_truncate = false);
|
bool AddStat(std::string& key, headers_t& meta, bool forcedir = false, bool no_truncate = false);
|
||||||
|
|
||||||
// Change no truncate flag
|
// Change no truncate flag
|
||||||
void ChangeNoTruncateFlag(std::string key, bool no_truncate);
|
void ChangeNoTruncateFlag(const std::string& key, bool no_truncate);
|
||||||
|
|
||||||
// Delete stat cache
|
// Delete stat cache
|
||||||
bool DelStat(const char* key);
|
bool DelStat(const char* key);
|
||||||
|
@ -586,7 +586,7 @@ string mydirname(const char* path)
|
|||||||
return mydirname(string(path));
|
return mydirname(string(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
string mydirname(string path)
|
string mydirname(const string& path)
|
||||||
{
|
{
|
||||||
return string(dirname((char*)path.c_str()));
|
return string(dirname((char*)path.c_str()));
|
||||||
}
|
}
|
||||||
@ -601,7 +601,7 @@ string mybasename(const char* path)
|
|||||||
return mybasename(string(path));
|
return mybasename(string(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
string mybasename(string path)
|
string mybasename(const string& path)
|
||||||
{
|
{
|
||||||
return string(basename((char*)path.c_str()));
|
return string(basename((char*)path.c_str()));
|
||||||
}
|
}
|
||||||
|
@ -109,9 +109,9 @@ std::string get_username(uid_t uid);
|
|||||||
int is_uid_include_group(uid_t uid, gid_t gid);
|
int is_uid_include_group(uid_t uid, gid_t gid);
|
||||||
|
|
||||||
std::string mydirname(const char* path);
|
std::string mydirname(const char* path);
|
||||||
std::string mydirname(std::string path);
|
std::string mydirname(const std::string& path);
|
||||||
std::string mybasename(const char* path);
|
std::string mybasename(const char* path);
|
||||||
std::string mybasename(std::string path);
|
std::string mybasename(const std::string& path);
|
||||||
int mkdirp(const std::string& path, mode_t mode);
|
int mkdirp(const std::string& path, mode_t mode);
|
||||||
std::string get_exist_directory_path(const std::string& path);
|
std::string get_exist_directory_path(const std::string& path);
|
||||||
bool check_exist_dir_permission(const char* dirpath);
|
bool check_exist_dir_permission(const char* dirpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user