Pass by ref

This commit is contained in:
Alexander Karatarakis 2016-12-16 19:38:02 -08:00
parent fdec39f452
commit b666e90c32
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);
}