History

clean code in GeometryCache around the FBX file loader

Sam Gateau committed 11 years ago

Commit f4e1af61 parent 94cdae01 file · +2 −5Browse files

Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

interface/src/renderer/GeometryCache.cpp+2−5
@@ -832,7 +832,6 @@ void GeometryReader::run() { · 831 unmodified lines
832832 if (!_reply) {
833833 throw QString("Reply is NULL ?!");
834834 }
835− QString urlnameQ = _url.path().toLower();
836835 std::string urlname = _url.path().toLower().toStdString();
837836 bool urlValid = true;
838837 urlValid &= !urlname.empty();
@@ -841,8 +840,7 @@ void GeometryReader::run() { · 2 unmodified lines
841840 || _url.path().toLower().endsWith(".svo");
842841
843842 if (urlValid) {
844− QString urlnameQ = _url.path().toLower();
845− std::string urlnameQstd = urlnameQ.toStdString();
843+ // Let's read the binaries from the network
846844 QByteArray fileBinary = _reply->readAll();
847845 if (fileBinary.isEmpty() || fileBinary.isNull()) {
848846 throw QString("Read File binary is empty?!");
@@ -868,8 +866,7 @@ void GeometryReader::run() { · 19 unmodified lines
868866 } else {
869867 throw QString("url is invalid");
870868 }
871− // _url.path().toLower().endsWith(".svo") ? readSVO(_reply->readAll()) : readFBX(_reply->readAll(), _mapping)));
872−
869+
873870 } catch (const QString& error) {
874871 qDebug() << "Error reading " << _url << ": " << error;
875872 QMetaObject::invokeMethod(geometry.data(), "finishedLoading", Q_ARG(bool, false));