mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-12-05 01:36:28 +00:00
Use Strings::ascii_to_lowercase()
This commit is contained in:
parent
b80cdd1118
commit
d86c1ddd6c
@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "triplet.h"
|
||||
#include "vcpkg_Checks.h"
|
||||
#include "vcpkg_Strings.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -37,9 +38,7 @@ namespace vcpkg
|
||||
|
||||
triplet triplet::from_canonical_name(const std::string& triplet_as_string)
|
||||
{
|
||||
std::string s(triplet_as_string);
|
||||
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
|
||||
|
||||
const std::string s(Strings::ascii_to_lowercase(triplet_as_string));
|
||||
auto it = std::find(s.cbegin(), s.cend(), '-');
|
||||
Checks::check_exit(it != s.cend(), "Invalid triplet: %s", triplet_as_string);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user