Change StringName -> String conversion from operator String() to string().
This commit is contained in:
@@ -56,7 +56,7 @@ bool OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
||||
p_from->get_message_list(&raw_keys);
|
||||
|
||||
for (const StringName &key : raw_keys) {
|
||||
const String key_str = key.operator String();
|
||||
const String key_str = key.string();
|
||||
int p = key_str.find_char(0x04);
|
||||
if (p == -1) {
|
||||
keys.push_back(key);
|
||||
@@ -85,7 +85,7 @@ bool OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
||||
|
||||
for (const StringName &E : keys) {
|
||||
//hash string
|
||||
CharString cs = E.operator String().utf8();
|
||||
CharString cs = E.string().utf8();
|
||||
uint32_t h = hash(0, cs.get_data());
|
||||
Pair<int, CharString> p;
|
||||
p.first = idx;
|
||||
@@ -93,7 +93,7 @@ bool OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
||||
buckets.write[h % size].push_back(p);
|
||||
|
||||
//compress string
|
||||
CharString src_s = p_from->get_message(E).operator String().utf8();
|
||||
CharString src_s = p_from->get_message(E).string().utf8();
|
||||
CompressedString ps;
|
||||
ps.orig_len = src_s.size();
|
||||
ps.offset = total_compression_size;
|
||||
@@ -200,7 +200,7 @@ bool OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
||||
}
|
||||
|
||||
bool OptimizedTranslation::_set(const StringName &p_name, const Variant &p_value) {
|
||||
String prop_name = p_name.operator String();
|
||||
String prop_name = p_name.string();
|
||||
if (prop_name == "hash_table") {
|
||||
hash_table = p_value;
|
||||
} else if (prop_name == "bucket_table") {
|
||||
@@ -217,7 +217,7 @@ bool OptimizedTranslation::_set(const StringName &p_name, const Variant &p_value
|
||||
}
|
||||
|
||||
bool OptimizedTranslation::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
String prop_name = p_name.operator String();
|
||||
String prop_name = p_name.string();
|
||||
if (prop_name == "hash_table") {
|
||||
r_ret = hash_table;
|
||||
} else if (prop_name == "bucket_table") {
|
||||
@@ -240,7 +240,7 @@ StringName OptimizedTranslation::get_message(const StringName &p_src_text, const
|
||||
return StringName();
|
||||
}
|
||||
|
||||
CharString str = p_src_text.operator String().utf8();
|
||||
CharString str = p_src_text.string().utf8();
|
||||
uint32_t h = hash(0, str.get_data());
|
||||
|
||||
const int *htr = hash_table.ptr();
|
||||
|
||||
Reference in New Issue
Block a user