Skip to content

Commit

Permalink
noggit: fix reordering issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Adspartan committed Dec 10, 2024
1 parent 7e6eadd commit 5fc8d35
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ option (VALIDATE_OPENGL_PROGRAMS "Validate Opengl programs" ON)
include ("cmake/add_compiler_flag_if_supported.cmake")

add_noggit_compiler_flag_if_supported (-Werror=reorder)
add_noggit_compiler_flag_if_supported (/we5038)
add_noggit_compiler_flag_if_supported (-Werror=conditional-uninitialized)
add_noggit_compiler_flag_if_supported (-Werror=unused)
add_noggit_compiler_flag_if_supported (-Werror=unused-parameter)
Expand Down
2 changes: 1 addition & 1 deletion src/noggit/Brush.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Brush
private:
void update_values();

float _radius;
float _inner_ratio;
float _inner_size;
float _outer_size;
float _radius;
};
2 changes: 1 addition & 1 deletion src/noggit/MapView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1437,8 +1437,8 @@ MapView::MapView( math::degrees camera_yaw0
, bool from_bookmark
)
: _camera (camera_pos, camera_yaw0, camera_pitch0)
, _debug_cam (camera_pos, camera_yaw0, camera_pitch0)
, _world (std::move (world))
, _debug_cam(camera_pos, camera_yaw0, camera_pitch0)
, _chunk_mover(_world.get())
, mTimespeed(0.0f)
, _uid_fix (uid_fix)
Expand Down
16 changes: 8 additions & 8 deletions src/noggit/liquid_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,18 @@ liquid_layer::liquid_layer(MPQFile &f, std::size_t base_pos, math::vector_3d con
}

liquid_layer::liquid_layer(math::vector_3d const& base, noggit::liquid_layer_data const& data)
: pos(base)
: _subchunks(data.subchunk_mask)
, _vertices(data.vertices)
, _subchunks(data.subchunk_mask)
, pos(base)
{
changeLiquidID(data.liquid_id);
update_min_max();
}

liquid_layer::liquid_layer(liquid_layer&& other)
: _liquid_id(other._liquid_id)
: _fatigue_enabled(other._fatigue_enabled)
, _need_data_update(other._need_data_update)
, _liquid_id(other._liquid_id)
, _liquid_vertex_format(other._liquid_vertex_format)
, _minimum(other._minimum)
, _maximum(other._maximum)
Expand All @@ -170,25 +172,23 @@ liquid_layer::liquid_layer(liquid_layer&& other)
, _vertices(other._vertices)
, _indices_by_lod(other._indices_by_lod)
, _indices_count_by_lod(other._indices_count_by_lod)
, _fatigue_enabled(other._fatigue_enabled)
, _need_data_update(other._need_data_update)
, pos(other.pos)
{
// update liquid type and vertex format
changeLiquidID(_liquid_id);
}

liquid_layer::liquid_layer(liquid_layer const& other)
: _liquid_id(other._liquid_id)
: _fatigue_enabled(other._fatigue_enabled)
, _need_data_update(other._need_data_update)
, _liquid_id(other._liquid_id)
, _minimum(other._minimum)
, _maximum(other._maximum)
, _center(other._center)
, _subchunks(other._subchunks)
, _vertices(other._vertices)
, _indices_by_lod(other._indices_by_lod)
, _indices_count_by_lod(other._indices_count_by_lod)
, _fatigue_enabled(other._fatigue_enabled)
, _need_data_update(other._need_data_update)
, pos(other.pos)
{
// update liquid type and vertex format
Expand Down
3 changes: 2 additions & 1 deletion src/noggit/ui/asset_browser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ struct asset_tree_node

return *this;
}
std::vector<asset_tree_node> children;

std::string name;
std::vector<asset_tree_node> children;
};

namespace noggit::ui
Expand Down
4 changes: 2 additions & 2 deletions src/noggit/ui/chunk_mover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ namespace noggit::ui
, _override_area_id(true)
, _override_holes(true)
, _override_models(true)
, _radius(15.f)
, _square_brush(true)
, _fix_gaps(true)
, _clear_shadows(true)
, _clear_models(true)
, _radius(15.f)
, _square_brush(true)
, _preview_enabled(true)
{
auto layout(new QFormLayout(this));
Expand Down

0 comments on commit 5fc8d35

Please sign in to comment.