Skip to content

Commit

Permalink
fix msvc build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 16, 2018
1 parent 6551913 commit 5d11388
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion external/mdal/mdal_utils.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/ */


#include "mdal_utils.hpp" #include "mdal_utils.hpp"
#include <string>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
Expand Down Expand Up @@ -101,7 +102,14 @@ bool MDAL::contains( const std::string &str, const std::string &substr, Contains
auto it = std::search( auto it = std::search(
str.begin(), str.end(), str.begin(), str.end(),
substr.begin(), substr.end(), substr.begin(), substr.end(),
[]( char ch1, char ch2 ) { return std::toupper( ch1 ) == std::toupper( ch2 ); } []( char ch1, char ch2 )
{
#ifdef _MSC_VER
return toupper( ch1 ) == toupper( ch2 );
#else
return std::toupper( ch1 ) == std::toupper( ch2 );
#endif
}
); );
return ( it != str.end() ); return ( it != str.end() );
} }
Expand Down

0 comments on commit 5d11388

Please sign in to comment.