Skip to content

Commit ed2626e

Browse files
committed
Fix a few compile warnings
1 parent 80aa8df commit ed2626e

6 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/gtk/classes/MapArea3D.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ Sickle::MapArea3D::MapArea3D(Editor::EditorRef ed)
9696
, Lua::Referenceable{}
9797
, _editor{ed}
9898
, _prop_camera{*this, "camera", DEFAULT_CAMERA}
99+
, _prop_mouse_sensitivity{
100+
*this, "mouse-sensitivity", DEFAULT_MOUSE_SENSITIVITY}
101+
, _prop_shift_multiplier{*this, "grid-size", 2.0f}
99102
, _prop_state{*this, "state", {}}
100103
, _prop_transform{*this, "transform", DEFAULT_TRANSFORM}
101104
, _prop_wireframe{*this, "wireframe", false}
102-
, _prop_shift_multiplier{*this, "grid-size", 2.0f}
103-
, _prop_mouse_sensitivity{
104-
*this, "mouse-sensitivity", DEFAULT_MOUSE_SENSITIVITY}
105105
{
106106
set_required_version(4, 3);
107107
set_use_es(false);

src/gtk/classes/appwin/propertyeditor/cellrenderers/CellRendererColor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ void CellRendererColor::render_vfunc(
4141
{
4242
auto context = widget.get_style_context();
4343

44-
auto const xpad = property_xpad().get_value();
45-
auto const ypad = property_ypad().get_value();
46-
4744
auto const swatch_rect = _get_swatch_rect(cell_area);
4845

4946

src/gtk/classes/maparea2d/MapArea2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Sickle::MapArea2D::MapArea2D(Editor::EditorRef ed)
6262
: Glib::ObjectBase{typeid(MapArea2D)}
6363
, _editor{ed}
6464
, _css{Gtk::CssProvider::create()}
65-
, _prop_grid_size{*this, "grid-size", 32}
6665
, _prop_draw_angle{*this, "draw-angle", DrawAngle::TOP}
66+
, _prop_grid_size{*this, "grid-size", 32}
6767
, _prop_transform{*this, "transform", {}}
6868
, _brushbox_view{
6969
std::make_shared<BBox2ViewCustom>(

src/world3d/Face.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ void World3D::Face::_sync_vertices()
141141

142142
auto const u_axis = glm::normalize(_src->get_u());
143143
auto const v_axis = glm::normalize(_src->get_v());
144-
auto const normal = glm::normalize(glm::cross(u_axis, v_axis));
145144

146145
auto const texture_size = (_texture
147146
? glm::vec2{_texture->width, _texture->height}

src/world3d/Texture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ std::shared_ptr<World3D::Texture> World3D::Texture::make_missing_texture()
9494
for (size_t x = 0; x < SIZE; ++x)
9595
{
9696
auto const idx = 4 * (y * SIZE + x);
97-
if (x < HSIZE && y < HSIZE || x >= HSIZE && y >= HSIZE)
97+
if ((x < HSIZE && y < HSIZE) || (x >= HSIZE && y >= HSIZE))
9898
{
9999
pixels[idx+0] = 0x00;
100100
pixels[idx+1] = 0x00;

src/world3d/raycast/BoxColliderBrush.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void BoxColliderBrush::on_attach(Sickle::Componentable &obj)
3333
_src = &brush;
3434
_signals = std::make_unique<Signals>();
3535

36-
for (auto const face : _src->faces())
36+
for (auto const &face : _src->faces())
3737
{
3838
_signals->conns.push_back(
3939
face->signal_vertices_changed().connect(
@@ -54,7 +54,7 @@ void BoxColliderBrush::on_detach(Sickle::Componentable &obj)
5454
void BoxColliderBrush::update_bbox()
5555
{
5656
BBox3 bbox{};
57-
for (auto const face : _src->faces())
57+
for (auto const &face : _src->faces())
5858
for (auto const vertex : face->get_vertices())
5959
bbox.add(vertex);
6060
set_box(bbox);

0 commit comments

Comments
 (0)