Skip to content

Commit 5d11388

Browse files
committed
fix msvc build
1 parent 6551913 commit 5d11388

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

external/mdal/mdal_utils.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
#include "mdal_utils.hpp"
7+
#include <string>
78
#include <fstream>
89
#include <iostream>
910
#include <algorithm>
@@ -101,7 +102,14 @@ bool MDAL::contains( const std::string &str, const std::string &substr, Contains
101102
auto it = std::search(
102103
str.begin(), str.end(),
103104
substr.begin(), substr.end(),
104-
[]( char ch1, char ch2 ) { return std::toupper( ch1 ) == std::toupper( ch2 ); }
105+
[]( char ch1, char ch2 )
106+
{
107+
#ifdef _MSC_VER
108+
return toupper( ch1 ) == toupper( ch2 );
109+
#else
110+
return std::toupper( ch1 ) == std::toupper( ch2 );
111+
#endif
112+
}
105113
);
106114
return ( it != str.end() );
107115
}

0 commit comments

Comments
 (0)