Cleanup more warnings and bad code

This commit is contained in:
2025-09-29 05:30:22 -04:00
parent 082d1e8c88
commit 2a5a526b07
75 changed files with 448 additions and 632 deletions

View File

@@ -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}/..)

View File

@@ -34,6 +34,8 @@
// - base64: base64 decode/encode library.
// - stb_image: Image loading library.
//
#pragma once
#ifndef TINY_GLTF_H_
#define TINY_GLTF_H_

View File

@@ -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 );
}

View File

@@ -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

View File

@@ -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;

View File

@@ -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