mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
fix compiler warnings (GCC + Clang)
This commit is contained in:
parent
6c3d2d0907
commit
3d22de761f
50 changed files with 80 additions and 103 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include "util/stringutil.hpp"
|
||||
|
||||
namespace {
|
||||
int is_box(int c) {
|
||||
inline int is_box(int c) {
|
||||
switch (c) {
|
||||
case 'B':
|
||||
case 'b':
|
||||
|
|
@ -21,7 +21,7 @@ namespace {
|
|||
return 10;
|
||||
}
|
||||
|
||||
double power(double base, int64_t power) {
|
||||
inline double power(double base, int64_t power) {
|
||||
double result = 1.0;
|
||||
for (int64_t i = 0; i < power; i++) {
|
||||
result *= base;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ class TomlReader : BasicParser<char> {
|
|||
// todo: extract common part
|
||||
std::string parseMultilineString() {
|
||||
pos += 2;
|
||||
char next = peek();
|
||||
|
||||
std::stringstream ss;
|
||||
while (hasNext()) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ static model::Mesh build_mesh(
|
|||
const glm::vec2* uvs = nullptr;
|
||||
const glm::vec3* normals = nullptr;
|
||||
|
||||
int coordsIndex, uvsIndex, normalsIndex;
|
||||
int coordsIndex = 0, uvsIndex = 0, normalsIndex = 0;
|
||||
|
||||
for (int i = 0; i < attrs.size(); i++) {
|
||||
const auto& attr = attrs[i];
|
||||
|
|
@ -204,7 +204,7 @@ File vec3::load(
|
|||
// Header
|
||||
reader.checkMagic("\0\0VEC3\0\0", 8);
|
||||
int version = reader.getInt16();
|
||||
int reserved = reader.getInt16();
|
||||
[[maybe_unused]] int reserved = reader.getInt16();
|
||||
if (version > VERSION) {
|
||||
throw std::runtime_error("unsupported VEC3 version");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue