Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various MSVC compilation fixes #708

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion edition/funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ bool indices_to_bitarray_u16(Span<const int32_t> indices, DynamicBitset &bitarra
false,
format("Index {} is out of supported range 0..{}", i, max_supported_value)
);
return false;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion generators/graph/node_type_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ VoxelGraphFunction::Port make_port_from_io_node(const ProgramGraph::Node &node,
}

bool is_node_matching_port(const ProgramGraph::Node &node, const VoxelGraphFunction::Port &port) {
if (node.type_id != port.type) {
if (node.type_id != static_cast<uint32_t>(port.type)) {
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions meshers/transvoxel/transvoxel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include "../../util/profiling.h"
#include "transvoxel_tables.cpp"

#if defined(_MSC_VER)
#pragma warning(disable : 4701) // Potentially uninitialized local variable used.
#endif

// #define VOXEL_TRANSVOXEL_REUSE_VERTEX_ON_COINCIDENT_CASES

namespace zylann::voxel::transvoxel {
Expand Down
2 changes: 2 additions & 0 deletions streams/sqlite/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ bool Connection::save_block(const BlockLocation loc, const Span<const uint8_t> b
update_block_statement = _update_instance_block_statement;
break;
default:
update_block_statement = nullptr;
CRASH_NOW();
}

Expand Down Expand Up @@ -471,6 +472,7 @@ VoxelStream::ResultCode Connection::load_block(
get_block_statement = _get_instance_block_statement;
break;
default:
get_block_statement = nullptr;
CRASH_NOW();
}

Expand Down
1 change: 0 additions & 1 deletion streams/voxel_block_serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ bool deserialize_metadata(VoxelMetadata &meta, MemoryReader &mr) {
return false;
}
}
return false;
}

bool deserialize_metadata(Span<const uint8_t> p_src, VoxelBuffer &buffer) {
Expand Down
4 changes: 4 additions & 0 deletions terrain/instancing/voxel_instance_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include "../../util/math/triangle.h"
#include "../../util/profiling.h"

#if defined(_MSC_VER)
#pragma warning(disable : 4701) // Potentially uninitialized local variable used.
#endif

namespace zylann::voxel {

namespace {
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/fast_noise_2/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ else:
# env_fn2.Append(CXXFLAGS=["-Wno-shadow"])
# if '-Wshadow' in env_fn2['CXXFLAGS']:
# env_fn2['CXXFLAGS'].remove('-Wshadow')
env_fn2.disable_warnings()

env_fn2.disable_warnings()
env_fn2_scalar = env_fn2.Clone()
env_fn2_sse2 = env_fn2.Clone()
env_fn2_sse3 = env_fn2.Clone()
Expand Down
4 changes: 4 additions & 0 deletions util/string/expression_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#include <algorithm>
#include <cmath>

#if defined(_MSC_VER)
#pragma warning(disable : 4701) // Potentially uninitialized local variable used.
#endif

namespace zylann {
namespace ExpressionParser {

Expand Down