Miscellaneous code tidying, noticed in passing

This commit is contained in:
David Rowe 2016-01-08 10:17:36 +13:00
parent 25309e84b3
commit fc2bf8f585

View file

@ -72,7 +72,7 @@ void GeometryReader::run() {
} else if (_url.path().toLower().endsWith(".obj")) { } else if (_url.path().toLower().endsWith(".obj")) {
fbxgeo = OBJReader().readOBJ(_data, _mapping, _url); fbxgeo = OBJReader().readOBJ(_data, _mapping, _url);
} else { } else {
QString errorStr("usupported format"); QString errorStr("unsupported format");
emit onError(NetworkGeometry::ModelParseError, errorStr); emit onError(NetworkGeometry::ModelParseError, errorStr);
} }
emit onSuccess(fbxgeo); emit onSuccess(fbxgeo);
@ -149,7 +149,6 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u
if (_meshes.size() > 0) { if (_meshes.size() > 0) {
auto textureCache = DependencyManager::get<TextureCache>(); auto textureCache = DependencyManager::get<TextureCache>();
for (auto&& material : _materials) { for (auto&& material : _materials) {
QSharedPointer<NetworkTexture> matchingTexture = QSharedPointer<NetworkTexture>();
if (material->diffuseTextureName == name) { if (material->diffuseTextureName == name) {
material->diffuseTexture = textureCache->getTexture(url, DEFAULT_TEXTURE); material->diffuseTexture = textureCache->getTexture(url, DEFAULT_TEXTURE);
} else if (material->normalTextureName == name) { } else if (material->normalTextureName == name) {