mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +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) {
|
||||
case ByName:
|
||||
cmp = strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
cmp = g_strcasecmp (region1->name().c_str(), region2->name().c_str());
|
||||
break;
|
||||
|
||||
case ByLength:
|
||||
|
|
@ -1140,7 +1140,7 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
|
|||
break;
|
||||
|
||||
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;
|
||||
|
||||
case BySourceFileLength:
|
||||
|
|
@ -1153,9 +1153,9 @@ EditorRegions::sorter (TreeModel::iterator a, TreeModel::iterator b)
|
|||
|
||||
case BySourceFileFS:
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -538,13 +538,13 @@ struct PluginMenuCompareByCreator {
|
|||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
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) {
|
||||
return true;
|
||||
} else if (cmp == 0) {
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -556,7 +556,7 @@ struct PluginMenuCompareByName {
|
|||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
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) {
|
||||
return true;
|
||||
|
|
@ -574,13 +574,13 @@ struct PluginMenuCompareByCategory {
|
|||
bool operator() (PluginInfoPtr a, PluginInfoPtr b) const {
|
||||
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) {
|
||||
return true;
|
||||
} else if (cmp == 0) {
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue