summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/ProfileUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/ProfileUtils.cpp')
-rw-r--r--logic/minecraft/ProfileUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/logic/minecraft/ProfileUtils.cpp b/logic/minecraft/ProfileUtils.cpp
index 68fe0f14..9a886f1d 100644
--- a/logic/minecraft/ProfileUtils.cpp
+++ b/logic/minecraft/ProfileUtils.cpp
@@ -74,18 +74,18 @@ bool readOverrideOrders(QString path, PatchOrder &order)
// and then read it and process it if all above is true.
try
{
- auto obj = Json::ensureObject(doc);
+ auto obj = Json::requireObject(doc);
// check order file version.
- auto version = Json::ensureInteger(obj.value("version"));
+ auto version = Json::requireInteger(obj.value("version"));
if (version != currentOrderFileVersion)
{
throw JSONValidationError(QObject::tr("Invalid order file version, expected %1")
.arg(currentOrderFileVersion));
}
- auto orderArray = Json::ensureArray(obj.value("order"));
+ auto orderArray = Json::requireArray(obj.value("order"));
for(auto item: orderArray)
{
- order.append(Json::ensureString(item));
+ order.append(Json::requireString(item));
}
}
catch (JSONValidationError &err)