Skip to content

Commit

Permalink
Another attempt to fix the MacOS compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhoux committed Dec 29, 2023
1 parent f204c58 commit dd6f53a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
8 changes: 2 additions & 6 deletions include/cinder/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,10 @@ CI_API char charToLower( const char c );
//! Converts the character \a c to uppercase. Not Unicode-aware.
CI_API char charToUpper( const char c );

//! returns a copy of \a str with all characters converted to lowercase (using std::tolower()). Not Unicode-aware.
//! returns a copy of \a str with all characters converted to lowercase (using std::tolower()).
CI_API std::string toLower( std::string str );
//! returns a copy of \a str with all characters converted to lowercase (using std::tolower()). Not Unicode-aware.
CI_API std::string toLower( std::string str, const std::locale &loc );
//! returns a copy of \a str with all characters converted to uppercase (using std::toupper()). Not Unicode-aware.
//! returns a copy of \a str with all characters converted to uppercase (using std::toupper()).
CI_API std::string toUpper( std::string str );
//! returns a copy of \a str with all characters converted to uppercase (using std::toupper()). Not Unicode-aware.
CI_API std::string toUpper( std::string str, const std::locale &loc );

//! replaces all instances of \a find with \a replace in \a str. Not Unicode-aware.
CI_API void findReplaceInPlace( const std::string &find, const std::string &replace, std::string &str );
Expand Down
12 changes: 0 additions & 12 deletions src/cinder/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,24 +258,12 @@ std::string toLower( std::string str )
return str;
}

std::string toLower( std::string str, const std::locale &loc )
{
std::transform( str.begin(), str.end(), str.begin(), [loc]( unsigned char c ) { return std::tolower( c, loc ); } );
return str;
}

std::string toUpper( std::string str )
{
std::transform( str.begin(), str.end(), str.begin(), []( unsigned char c ) { return std::toupper( c ); } );
return str;
}

std::string toUpper( std::string str, const std::locale &loc )
{
std::transform( str.begin(), str.end(), str.begin(), [loc]( unsigned char c ) { return std::toupper( c, loc ); } );
return str;
}

void findReplaceInPlace( const std::string &find, const std::string &replace, std::string &str )
{
auto pos = str.find( find );
Expand Down

0 comments on commit dd6f53a

Please sign in to comment.