mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
Pass by ref
This commit is contained in:
parent
fdec39f452
commit
b666e90c32
@ -10,7 +10,7 @@ namespace vcpkg {namespace Files
|
||||
|
||||
void check_is_directory(const fs::path& dirpath);
|
||||
|
||||
bool has_invalid_chars_for_filesystem(const std::string s);
|
||||
bool has_invalid_chars_for_filesystem(const std::string& s);
|
||||
|
||||
expected<std::string> get_contents(const fs::path& file_path) noexcept;
|
||||
|
||||
|
@ -12,7 +12,7 @@ namespace vcpkg {namespace Files
|
||||
Checks::check_exit(fs::is_directory(dirpath), "The path %s is not a directory", dirpath.string());
|
||||
}
|
||||
|
||||
bool has_invalid_chars_for_filesystem(const std::string s)
|
||||
bool has_invalid_chars_for_filesystem(const std::string& s)
|
||||
{
|
||||
return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user