fix all msvc W3 warnings
parent
b6cf690c25
commit
11929260e2
|
@ -9,7 +9,9 @@ function(link_system_libs target_name)
|
||||||
target_link_libraries(${target_name} pthread m dl atomic)
|
target_link_libraries(${target_name} pthread m dl atomic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (WIN32)
|
||||||
|
target_compile_options(${target_name} PRIVATE -WX -W3 -wd5105)
|
||||||
|
else()
|
||||||
target_compile_options(${target_name} PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
target_compile_options(${target_name} PRIVATE -Werror -Wall -Wextra -Wno-unused-function -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter)
|
||||||
endif ()
|
endif ()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
|
@ -34,7 +34,7 @@ int32_t tracker_read_update(librg_world *w, librg_event *e) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
data.last_update = get_cached_time()*1000.0f;
|
data.last_update = (uint64_t)(get_cached_time()*1000.0f);
|
||||||
data.layer_id = view->active_layer_id;
|
data.layer_id = view->active_layer_id;
|
||||||
predict_receive_update(d, &data);
|
predict_receive_update(d, &data);
|
||||||
entity_view_update_or_create(&view->entities, entity_id, data);
|
entity_view_update_or_create(&view->entities, entity_id, data);
|
||||||
|
|
|
@ -19,7 +19,7 @@ typedef WORLD_BLOCK_OBSERVER(world_block_observer_proc);
|
||||||
// ensure it is set in worldgen_build
|
// ensure it is set in worldgen_build
|
||||||
|
|
||||||
int worldgen_in_circle(int x, int y, int radius) {
|
int worldgen_in_circle(int x, int y, int radius) {
|
||||||
return (zpl_pow(x, 2) + zpl_pow(y, 2)) < zpl_pow(radius, 2);
|
return (zpl_pow((float)x, 2.0f) + zpl_pow((float)y, 2.0f)) < zpl_pow((float)radius, 2.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void world_fill_rect(block_id *data, block_id id, uint32_t x, uint32_t y, uint32_t w, uint32_t h, world_block_observer_proc *proc) {
|
static void world_fill_rect(block_id *data, block_id id, uint32_t x, uint32_t y, uint32_t w, uint32_t h, world_block_observer_proc *proc) {
|
||||||
|
|
|
@ -61,7 +61,7 @@ int32_t worldgen_build(world_data *wld) {
|
||||||
world_fill_circle(world->data, dirt_id, world->dim / 2, world->dim / 2, radius, NULL);
|
world_fill_circle(world->data, dirt_id, world->dim / 2, world->dim / 2, radius, NULL);
|
||||||
|
|
||||||
// narrow boy cirlce
|
// narrow boy cirlce
|
||||||
world_fill_circle(world->data, grnd_id, world->dim / 2, world->dim / 2, radius * 0.7f, NULL);
|
world_fill_circle(world->data, grnd_id, world->dim / 2, world->dim / 2, (uint32_t)(radius * 0.7f), NULL);
|
||||||
|
|
||||||
|
|
||||||
return WORLD_ERROR_NONE;
|
return WORLD_ERROR_NONE;
|
||||||
|
|
Loading…
Reference in New Issue