mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Spelling of canonical
This commit is contained in:
@@ -86,7 +86,7 @@ class GetMember : private GetDefaultMember {
|
||||
/// Handle an object: we are done if the name matches
|
||||
template <typename T>
|
||||
void handle(const Char* name, const T& object) {
|
||||
if (!gdm.result() && cannocial_name_compare(target_name, name)) {
|
||||
if (!gdm.result() && canonical_name_compare(target_name, name)) {
|
||||
gdm.handle(object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ bool Reader::enterAnyBlock() {
|
||||
bool Reader::enterBlock(const Char* name) {
|
||||
if (state == ENTERED) moveNext(); // on the key of the parent block, first move inside it
|
||||
if (indent != expected_indent) return false; // not enough indentation
|
||||
if (cannocial_name_compare(key, name)) {
|
||||
if (canonical_name_compare(key, name)) {
|
||||
state = ENTERED;
|
||||
expected_indent += 1; // the indent inside the block must be at least this much
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -391,7 +391,7 @@ bool is_substr_i(const String& str, size_t pos, const String& cmp) {
|
||||
return is_substr_i(str, pos, static_cast<const Char*>(cmp.c_str()));
|
||||
}
|
||||
|
||||
bool cannocial_name_compare(const String& as, const Char* b) {
|
||||
bool canonical_name_compare(const String& as, const Char* b) {
|
||||
const Char* a = as.c_str();
|
||||
while (true) {
|
||||
if (*a != *b && !(*a == _(' ') && *b == _('_'))) return false;
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ bool is_substr_i(const String& str, size_t pos, const String& cmp);
|
||||
size_t find_i(const String& heystack, const String& needle);
|
||||
|
||||
/// Compare two strings for equality, b may contain '_' where a contains ' '
|
||||
bool cannocial_name_compare(const String& a, const Char* b);
|
||||
bool canonical_name_compare(const String& a, const Char* b);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Regular expressions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user