mirror of
https://github.com/overte-org/overte.git
synced 2025-07-29 12:09:12 +02:00
Use traditional C strings rather than raw strings
This commit is contained in:
parent
df2bc6ba5c
commit
a65466f154
2 changed files with 4 additions and 16 deletions
|
@ -904,9 +904,7 @@ bool Octree::toJSONString(QString& jsonString, const OctreeElementPointer& eleme
|
||||||
top = _rootElement;
|
top = _rootElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonString += QString(R"({
|
jsonString += QString("{\n \"DataVersion\": %1,\n \"Entities\": [").arg(_persistDataVersion);
|
||||||
"DataVersion": %1,
|
|
||||||
"Entities": [)").arg(_persistDataVersion);
|
|
||||||
|
|
||||||
writeToJSON(jsonString, top);
|
writeToJSON(jsonString, top);
|
||||||
|
|
||||||
|
@ -914,12 +912,7 @@ bool Octree::toJSONString(QString& jsonString, const OctreeElementPointer& eleme
|
||||||
PacketType expectedType = expectedDataPacketType();
|
PacketType expectedType = expectedDataPacketType();
|
||||||
PacketVersion expectedVersion = versionForPacketType(expectedType);
|
PacketVersion expectedVersion = versionForPacketType(expectedType);
|
||||||
|
|
||||||
jsonString += QString(R"(
|
jsonString += QString("\n ],\n \"Id\": \"%1\",\n \"Version\": %2\n}\n").arg(_persistID.toString()).arg((int)expectedVersion);
|
||||||
],
|
|
||||||
"Id": "%1",
|
|
||||||
"Version": %2
|
|
||||||
}
|
|
||||||
)").arg(_persistID.toString()).arg((int)expectedVersion);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,16 +63,11 @@ bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromFile(QString path) {
|
||||||
QByteArray OctreeUtils::RawOctreeData::toByteArray() {
|
QByteArray OctreeUtils::RawOctreeData::toByteArray() {
|
||||||
QByteArray jsonString;
|
QByteArray jsonString;
|
||||||
|
|
||||||
jsonString += QString(R"({
|
jsonString += QString("{\n \"DataVersion\": %1,\n").arg(dataVersion);
|
||||||
"DataVersion": %1,
|
|
||||||
)").arg(dataVersion);
|
|
||||||
|
|
||||||
writeSubclassData(jsonString);
|
writeSubclassData(jsonString);
|
||||||
|
|
||||||
jsonString += QString(R"(,
|
jsonString += QString(",\n \"Id\": \"%1\",\n \"Version\": %2\n}").arg(id.toString()).arg(version);
|
||||||
"Id": "%1",
|
|
||||||
"Version": %2
|
|
||||||
})").arg(id.toString()).arg(version);
|
|
||||||
|
|
||||||
return jsonString;
|
return jsonString;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue