Cleanup more warnings and bad code
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
|
||||
AddFGLChildLibrary(FGLLoader STATIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
AddFGLChildLibrary(FGLLoader STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
#target_include_directories(FGLLoader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
// - base64: base64 decode/encode library.
|
||||
// - stb_image: Image loading library.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#ifndef TINY_GLTF_H_
|
||||
#define TINY_GLTF_H_
|
||||
|
||||
@@ -57,6 +57,7 @@ THE SOFTWARE.
|
||||
// #include "tiny_obj_loader.h"
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#ifndef TINY_OBJ_LOADER_H_
|
||||
#define TINY_OBJ_LOADER_H_
|
||||
|
||||
@@ -2366,9 +2367,8 @@ namespace tinyobj
|
||||
// flush previous material.
|
||||
if ( !material.name.empty() )
|
||||
{
|
||||
material_map->insert( std::pair<
|
||||
std::string,
|
||||
int >( material.name, static_cast< int >( materials->size() ) ) );
|
||||
material_map->insert(
|
||||
std::pair< std::string, int >( material.name, static_cast< int >( materials->size() ) ) );
|
||||
materials->push_back( material );
|
||||
}
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#define TINYGLTF_USE_CPP14
|
||||
#include "tiny_gltf.h"
|
||||
#include "../include/tiny_gltf.h"
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -15267,7 +15267,7 @@ class binary_writer
|
||||
static CharType to_char_type(std::uint8_t x) noexcept
|
||||
{
|
||||
static_assert(sizeof(std::uint8_t) == sizeof(CharType), "size of CharType must be equal to std::uint8_t");
|
||||
static_assert(std::is_trivial<CharType>::value, "CharType must be trivial");
|
||||
static_assert(std::is_trivially_constructible_v<CharType> && std::is_trivially_copyable_v<CharType>, "CharType must be trivial");
|
||||
CharType result;
|
||||
std::memcpy(&result, &x, sizeof(x));
|
||||
return result;
|
||||
@@ -9,5 +9,5 @@
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#define TINYOBJLOADER_IMPLEMENTATION
|
||||
#include "tiny_obj_loader.h"
|
||||
#include "../include/tiny_obj_loader.h"
|
||||
#pragma GCC diagnostic pop
|
||||
Reference in New Issue
Block a user