mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
Make member function const
This commit is contained in:
parent
a098ecad03
commit
687ac42cdd
@ -20,7 +20,7 @@ namespace vcpkg
|
||||
|
||||
std::string system() const;
|
||||
|
||||
bool validate(const vcpkg_paths& paths);
|
||||
bool validate(const vcpkg_paths& paths) const;
|
||||
};
|
||||
|
||||
bool operator==(const triplet& left, const triplet& right);
|
||||
|
@ -58,13 +58,13 @@ namespace vcpkg
|
||||
Checks::exit_with_message("Unknown system: %s", value);
|
||||
}
|
||||
|
||||
bool triplet::validate(const vcpkg_paths & paths)
|
||||
bool triplet::validate(const vcpkg_paths& paths) const
|
||||
{
|
||||
auto it = fs::directory_iterator(paths.triplets);
|
||||
for(; it != fs::directory_iterator(); ++it)
|
||||
for (; it != fs::directory_iterator(); ++it)
|
||||
{
|
||||
std::string triplet_file_name = it->path().stem().generic_u8string();
|
||||
if(value == triplet_file_name) // TODO: fuzzy compare
|
||||
if (value == triplet_file_name) // TODO: fuzzy compare
|
||||
{
|
||||
//value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user