From df2bc6ba5cbf1236f6ba89a2085eadca35df88de Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Tue, 13 Nov 2018 10:18:30 -0800 Subject: [PATCH] Remove unused function --- libraries/octree/src/OctreeDataUtils.cpp | 28 ------------------------ 1 file changed, 28 deletions(-) diff --git a/libraries/octree/src/OctreeDataUtils.cpp b/libraries/octree/src/OctreeDataUtils.cpp index 8c6e45ae66..f3eed084e0 100644 --- a/libraries/octree/src/OctreeDataUtils.cpp +++ b/libraries/octree/src/OctreeDataUtils.cpp @@ -19,34 +19,6 @@ #include #include -namespace { - // Reads octree file and parses it into a QJsonDocument. Handles both gzipped and non-gzipped files. - // Returns true if the file was successfully opened and parsed, otherwise false. - // Example failures: file does not exist, gzipped file cannot be unzipped, invalid JSON. - bool readOctreeFile(QString path, QJsonDocument* doc) { - QFile file(path); - if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "Cannot open json file for reading: " << path; - return false; - } - - QByteArray data = file.readAll(); - QByteArray jsonData; - - if (!gunzip(data, jsonData)) { - jsonData = data; - } - - QJsonParseError parserError; - *doc = QJsonDocument::fromJson(jsonData, &parserError); - if (parserError.error != QJsonParseError::NoError) { - qWarning() << "Error reading JSON file" << path << "-" << parserError.errorString(); - } - return !doc->isNull(); - } - -} // Anon namespace. - bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromMap(const QVariantMap& map) { if (map.contains("Id") && map.contains("DataVersion") && map.contains("Version")) { id = map["Id"].toUuid();