mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
fix short_version case priority
This commit is contained in:
parent
7e8230c3be
commit
4349839c72
1 changed files with 4 additions and 4 deletions
|
|
@ -119,19 +119,19 @@ short_version (string orig, string::size_type target_length)
|
||||||
orig.replace (pos, 1, "");
|
orig.replace (pos, 1, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove upper-case vowels, starting at end */
|
/* remove lower-case consonants, starting at end */
|
||||||
|
|
||||||
while (orig.length() > target_length) {
|
while (orig.length() > target_length) {
|
||||||
if ((pos = orig.find_last_of (_("AEIOU"))) == string::npos) {
|
if ((pos = orig.find_last_of (_("bcdfghjklmnpqrtvwxyz"))) == string::npos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
orig.replace (pos, 1, "");
|
orig.replace (pos, 1, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove lower-case consonants, starting at end */
|
/* remove upper-case vowels, starting at end */
|
||||||
|
|
||||||
while (orig.length() > target_length) {
|
while (orig.length() > target_length) {
|
||||||
if ((pos = orig.find_last_of (_("bcdfghjklmnpqrtvwxyz"))) == string::npos) {
|
if ((pos = orig.find_last_of (_("AEIOU"))) == string::npos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
orig.replace (pos, 1, "");
|
orig.replace (pos, 1, "");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue