File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ struct RGBChannelParams
2525 int b_index;
2626};
2727
28+ static inline bool areEqual (const char * a, const char * b) {
29+ #ifdef _MSC_VER
30+ return _stricmp (a, b) == 0 ;
31+ #else
32+ return strcasecmp (a, b) == 0 ;
33+ #endif
34+ }
35+
2836bool
2937make_channel_map (
3038 int channel_count,
@@ -65,21 +73,21 @@ make_channel_map (
6573
6674 for (size_t j = 0 ; j < params_count; j++)
6775 {
68- if (strcasecmp (suffix, params[j].r_suffix ) == 0 &&
76+ if (areEqual (suffix, params[j].r_suffix ) &&
6977 params[j].r_index < 0 )
7078 {
7179 params[j].r_index = i;
7280 break ;
7381 }
7482 else if (
75- strcasecmp (suffix, params[j].g_suffix ) == 0 &&
83+ areEqual (suffix, params[j].g_suffix ) &&
7684 params[j].g_index < 0 )
7785 {
7886 params[j].g_index = i;
7987 break ;
8088 }
8189 else if (
82- strcasecmp (suffix, params[j].b_suffix ) == 0 &&
90+ areEqual (suffix, params[j].b_suffix ) &&
8391 params[j].b_index < 0 )
8492 {
8593 params[j].b_index = i;
You can’t perform that action at this time.
0 commit comments