mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 22:29:08 +08:00
Rename. Remove stray semicolon
This commit is contained in:
parent
fe083492e8
commit
7a19c72ca9
@ -7,7 +7,7 @@
|
|||||||
namespace vcpkg::Strings::details
|
namespace vcpkg::Strings::details
|
||||||
{
|
{
|
||||||
// To disambiguate between two overloads
|
// To disambiguate between two overloads
|
||||||
static bool IS_SPACE(const char c) { return std::isspace(c) != 0; };
|
static bool is_space(const char c) { return std::isspace(c) != 0; }
|
||||||
|
|
||||||
// Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower()
|
// Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower()
|
||||||
static char tolower_char(const char c) { return static_cast<char>(std::tolower(c)); }
|
static char tolower_char(const char c) { return static_cast<char>(std::tolower(c)); }
|
||||||
@ -143,8 +143,8 @@ namespace vcpkg::Strings
|
|||||||
|
|
||||||
std::string trim(std::string&& s)
|
std::string trim(std::string&& s)
|
||||||
{
|
{
|
||||||
s.erase(std::find_if_not(s.rbegin(), s.rend(), details::IS_SPACE).base(), s.end());
|
s.erase(std::find_if_not(s.rbegin(), s.rend(), details::is_space).base(), s.end());
|
||||||
s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::IS_SPACE));
|
s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::is_space));
|
||||||
return std::move(s);
|
return std::move(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user