Fix call of overloaded 'String(const char*, int)' is ambiguous

This commit is contained in:
Benoit Blanchon
2022-02-17 10:47:42 +01:00
parent ef8379df1b
commit a880614a75
15 changed files with 47 additions and 31 deletions

View File

@@ -13,7 +13,8 @@ class Pair {
public:
Pair(MemoryPool* pool, VariantSlot* slot) {
if (slot) {
_key = String(slot->key(), !slot->ownsKey());
_key = String(slot->key(),
slot->ownsKey() ? String::Copied : String::Linked);
_value = VariantRef(pool, slot->data());
}
}
@@ -35,7 +36,8 @@ class PairConst {
public:
PairConst(const VariantSlot* slot) {
if (slot) {
_key = String(slot->key(), !slot->ownsKey());
_key = String(slot->key(),
slot->ownsKey() ? String::Copied : String::Linked);
_value = VariantConstRef(slot->data());
}
}