Attempt to fix build warnings

This commit is contained in:
sabrina-shanman 2019-03-14 09:43:32 -07:00
parent 5b75eb34e8
commit 5e430c98c5
2 changed files with 11 additions and 3 deletions

View file

@ -109,7 +109,7 @@ void MaterialBaker::processMaterial() {
QUrl textureURL = url.adjusted(QUrl::RemoveQuery | QUrl::RemoveFragment);
// FIXME: this isn't properly handling bumpMaps or glossMaps
static const std::unordered_map<graphics::Material::MapChannel, image::TextureUsage::Type> MAP_CHANNEL_TO_TEXTURE_USAGE_TYPE_MAP {
static const std::unordered_map<graphics::Material::MapChannel, image::TextureUsage::Type> MAP_CHANNEL_TO_TEXTURE_USAGE_TYPE_MAP({
{ graphics::Material::MapChannel::EMISSIVE_MAP, image::TextureUsage::EMISSIVE_TEXTURE },
{ graphics::Material::MapChannel::ALBEDO_MAP, image::TextureUsage::ALBEDO_TEXTURE },
{ graphics::Material::MapChannel::METALLIC_MAP, image::TextureUsage::METALLIC_TEXTURE },
@ -118,7 +118,7 @@ void MaterialBaker::processMaterial() {
{ graphics::Material::MapChannel::OCCLUSION_MAP, image::TextureUsage::OCCLUSION_TEXTURE },
{ graphics::Material::MapChannel::LIGHTMAP_MAP, image::TextureUsage::LIGHTMAP_TEXTURE },
{ graphics::Material::MapChannel::SCATTERING_MAP, image::TextureUsage::SCATTERING_TEXTURE }
};
});
auto it = MAP_CHANNEL_TO_TEXTURE_USAGE_TYPE_MAP.find(mapChannel);
if (it == MAP_CHANNEL_TO_TEXTURE_USAGE_TYPE_MAP.end()) {
@ -126,7 +126,7 @@ void MaterialBaker::processMaterial() {
return;
}
QPair<QUrl, image::TextureUsage::Type> textureKey { textureURL, it->second };
QPair<QUrl, image::TextureUsage::Type> textureKey(textureURL, it->second);
if (!_textureBakers.contains(textureKey)) {
QSharedPointer<TextureBaker> textureBaker {
new TextureBaker(textureURL, it->second, _textureOutputDir),

View file

@ -16,6 +16,11 @@
#pragma warning( push )
#pragma warning( disable : 4267 )
#endif
// gcc and clang
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#endif
#include <draco/compression/encode.h>
#include <draco/mesh/triangle_soup_mesh_builder.h>
@ -23,6 +28,9 @@
#ifdef _WIN32
#pragma warning( pop )
#endif
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#include "ModelBakerLogging.h"
#include "ModelMath.h"