Revert "[ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder"

This reverts commit 23da0d3f2c.
This commit is contained in:
Émilie Feral
2019-05-03 16:29:28 +02:00
parent 72d8fdd4a5
commit 8b926612a2
39 changed files with 129 additions and 145 deletions

View File

@@ -46,9 +46,9 @@ bool Script::nameCompliant(const char * name) {
* We do not allow upper cases in the script names because script names are
* used in the URLs of the NumWorks workshop website and we do not want
* problems with case sensitivity. */
Ion::UTF8Decoder decoder(name);
UTF8Decoder decoder(name);
CodePoint c = decoder.nextCodePoint();
if (c == UCodePointNull || !(Ion::UTF8Helper::CodePointIsLowerCaseLetter(c) || c == '_' || c == '.')) {
if (c == UCodePointNull || !(UTF8Helper::CodePointIsLowerCaseLetter(c) || c == '_' || c == '.')) {
/* The name cannot be empty. Its first letter must be in [a-z_] or the
* extension dot. */
return false;
@@ -57,7 +57,7 @@ bool Script::nameCompliant(const char * name) {
if (c == '.' && strcmp(decoder.stringPosition(), ScriptStore::k_scriptExtension) == 0) {
return true;
}
if (!(Ion::UTF8Helper::CodePointIsLowerCaseLetter(c) || c == '_' || Ion::UTF8Helper::CodePointIsNumber(c))) {
if (!(UTF8Helper::CodePointIsLowerCaseLetter(c) || c == '_' || UTF8Helper::CodePointIsNumber(c))) {
return false;
}
c = decoder.nextCodePoint();