mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
Use char instead of string when string-searching for a single char
This commit is contained in:
parent
bbf1a737b6
commit
9d85ed4c17
@ -7,7 +7,7 @@
|
||||
|
||||
namespace vcpkg::Commands::Hash
|
||||
{
|
||||
static void do_file_hash(fs::path const &cmake_exe_path, fs::path const& path, std::string const& hash_type)
|
||||
static void do_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type)
|
||||
{
|
||||
const std::string cmd_line = Strings::format(
|
||||
R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string());
|
||||
@ -17,7 +17,7 @@ namespace vcpkg::Commands::Hash
|
||||
|
||||
std::string const& output = ec_data.output;
|
||||
|
||||
const auto start = output.find_first_of(" ");
|
||||
const auto start = output.find_first_of(' ');
|
||||
Checks::check_exit(
|
||||
VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user