mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Rename 'cannocial_name_form' to 'canonical_name_form'
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1433 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -257,7 +257,7 @@ void Reader::readLine(bool in_string) {
|
||||
indent += 1;
|
||||
}
|
||||
}
|
||||
key = cannocial_name_form(trim(key));
|
||||
key = canonical_name_form(trim(key));
|
||||
value = pos == String::npos ? _("") : trim_left(line.substr(pos+1));
|
||||
if (key.empty() && pos!=String::npos) key = _(" "); // we don't want an empty key if there was a colon
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void Writer::writePending() {
|
||||
}
|
||||
indentation += 1;
|
||||
writeIndentation();
|
||||
writeUTF8(stream, cannocial_name_form(pending_opened[i]));
|
||||
writeUTF8(stream, canonical_name_form(pending_opened[i]));
|
||||
}
|
||||
pending_opened.clear();
|
||||
}
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ String capitalize_sentence(const String& s) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
String cannocial_name_form(const String& str) {
|
||||
String canonical_name_form(const String& str) {
|
||||
String ret;
|
||||
ret.reserve(str.size());
|
||||
bool leading = true;
|
||||
|
||||
+2
-2
@@ -152,12 +152,12 @@ String capitalize(const String&);
|
||||
/** for use in dialogs */
|
||||
String capitalize_sentence(const String&);
|
||||
|
||||
/// Convert a field name to cannocial form
|
||||
/// Convert a field name to canonical form
|
||||
/** - lower case and ' ' instead of '_'.
|
||||
* - non alphanumeric characters are droped
|
||||
* - "camalCase" is converted to words "camel case" (TODO)
|
||||
*/
|
||||
String cannocial_name_form(const String&);
|
||||
String canonical_name_form(const String&);
|
||||
|
||||
/// Returns the singular form of a string
|
||||
/** Used for reflection, for example "vector<T> apples" is written with keys
|
||||
|
||||
Reference in New Issue
Block a user