mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 11:46:56 +02:00
Fixed compile error on Xcode.
This commit is contained in:
parent
49ab3d6b43
commit
e0689b1484
1 changed files with 7 additions and 7 deletions
|
@ -1901,9 +1901,9 @@ JSONReader::JSONReader(const QJsonDocument& document, Bitstream::GenericsMode ge
|
|||
int highestValue = 0;
|
||||
foreach (const QJsonValue& value, type.value("values").toArray()) {
|
||||
QJsonObject object = value.toObject();
|
||||
int value = object.value("value").toInt();
|
||||
highestValue = qMax(value, highestValue);
|
||||
values.append(NameIntPair(object.value("key").toString().toLatin1(), value));
|
||||
int intValue = object.value("value").toInt();
|
||||
highestValue = qMax(intValue, highestValue);
|
||||
values.append(NameIntPair(object.value("key").toString().toLatin1(), intValue));
|
||||
}
|
||||
streamer = TypeStreamerPointer(new GenericEnumTypeStreamer(latinName,
|
||||
values, getBitsForHighestValue(highestValue), QByteArray()));
|
||||
|
@ -1944,13 +1944,13 @@ JSONReader::JSONReader(const QJsonDocument& document, Bitstream::GenericsMode ge
|
|||
bool matches = (array.size() == metaEnum.keyCount());
|
||||
foreach (const QJsonValue& value, array) {
|
||||
QJsonObject object = value.toObject();
|
||||
int value = object.value("value").toInt();
|
||||
highestValue = qMax(value, highestValue);
|
||||
int intValue = object.value("value").toInt();
|
||||
highestValue = qMax(intValue, highestValue);
|
||||
int mapping = metaEnum.keyToValue(object.value("key").toString().toLatin1());
|
||||
if (mapping != -1) {
|
||||
mappings.insert(value, mapping);
|
||||
mappings.insert(intValue, mapping);
|
||||
}
|
||||
matches &= (value == mapping);
|
||||
matches &= (intValue == mapping);
|
||||
}
|
||||
// if everything matches our built-in enum, we can use that, which will be faster
|
||||
if (matches) {
|
||||
|
|
Loading…
Reference in a new issue