mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
use g_strcasecmp() instead of strcasecmp() which doesn't exist with MSVC (some versions, at least), part 2
This commit is contained in:
parent
028cd5660f
commit
ddcb78f3e2
2 changed files with 9 additions and 9 deletions
|
|
@ -1115,7 +1115,7 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
|
||||||
|
|
||||||
switch (_sort_type) {
|
switch (_sort_type) {
|
||||||
case ByName:
|
case ByName:
|
||||||
cmp = strcasecmp (region1->name().c_str(), region2->name().c_str());
|
cmp = g_strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ByLength:
|
case ByLength:
|
||||||
|
|
@ -1140,7 +1140,7 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BySourceFileName:
|
case BySourceFileName:
|
||||||
cmp = strcasecmp (region1->source()->name().c_str(), region2->source()->name().c_str());
|
cmp = g_strcasecmp (region1->source()->name().c_str(), region2->source()->name().c_str());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BySourceFileLength:
|
case BySourceFileLength:
|
||||||
|
|
@ -1153,9 +1153,9 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
|
||||||
|
|
||||||
case BySourceFileFS:
|
case BySourceFileFS:
|
||||||
if (region1->source()->name() == region2->source()->name()) {
|
if (region1->source()->name() == region2->source()->name()) {
|
||||||
cmp = strcasecmp (region1->name().c_str(), region2->name().c_str());
|
cmp = g_strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||||
} else {
|
} else {
|
||||||
cmp = strcasecmp (region1->source()->name().c_str(), region2->source()->name().c_str());
|
cmp = g_strcasecmp (region1->source()->name().c_str(), region2->source()->name().c_str());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -538,13 +538,13 @@ struct PluginMenuCompareByCreator {
|
||||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
cmp = strcasecmp (a->creator.c_str(), b->creator.c_str());
|
cmp = g_strcasecmp (a->creator.c_str(), b->creator.c_str());
|
||||||
|
|
||||||
if (cmp < 0) {
|
if (cmp < 0) {
|
||||||
return true;
|
return true;
|
||||||
} else if (cmp == 0) {
|
} else if (cmp == 0) {
|
||||||
/* same creator ... compare names */
|
/* same creator ... compare names */
|
||||||
if (strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
if (g_strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -556,7 +556,7 @@ struct PluginMenuCompareByName {
|
||||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
cmp = strcasecmp (a->name.c_str(), b->name.c_str());
|
cmp = g_strcasecmp (a->name.c_str(), b->name.c_str());
|
||||||
|
|
||||||
if (cmp < 0) {
|
if (cmp < 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -574,13 +574,13 @@ struct PluginMenuCompareByCategory {
|
||||||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|
||||||
cmp = strcasecmp (a->category.c_str(), b->category.c_str());
|
cmp = g_strcasecmp (a->category.c_str(), b->category.c_str());
|
||||||
|
|
||||||
if (cmp < 0) {
|
if (cmp < 0) {
|
||||||
return true;
|
return true;
|
||||||
} else if (cmp == 0) {
|
} else if (cmp == 0) {
|
||||||
/* same category ... compare names */
|
/* same category ... compare names */
|
||||||
if (strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
if (g_strcasecmp (a->name.c_str(), b->name.c_str()) < 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue