Uses smart_less for position() script function

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@506 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-06 15:29:48 +00:00
parent 939d50804c
commit 86f7cb4176
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ struct OrderCache<T>::CompareValues {
CompareValues(const vector<String>& values) : values(values) {}
inline bool operator () (const KV& a, const KV& b) {
return values[a.second] < values[b.second];
return smart_less(values[a.second], values[b.second]);
}
};
+1
View File
@@ -221,6 +221,7 @@ bool smart_less(const String& as, const String& bs) {
return lt;
} else {
// compare characters
// TODO: decompose characters, in particular AE and accents
Char la = toLower(a), lb = toLower(b);
if (la < lb) return true;
if (la > lb) return false;