summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-08-11 12:02:20 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-08-11 12:02:20 +0200
commit402acc4bc8c525b1585465b5ed888142d5375094 (patch)
tree7260908df653ff289aeb9a25c8eae92365195326 /editor/draw.cpp
parent6e311bf0b0a92cb07e21237af4705f01a9d10eb4 (diff)
initialize Math::Vector directly from arrays
Following Magnum change.
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index c88984af..b366deaa 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -143,7 +143,7 @@ void app::draw_collision_boxes()
if (x.pass == (uint64_t)pass_mode::pass)
if (x.id < TILE_COUNT*2+1)
return true;
- Vector2 start(rect.m_min[0], rect.m_min[1]), end(rect.m_max[0], rect.m_max[1]);
+ Vector2 start{rect.m_min}, end{rect.m_max};
auto size = (end - start);
auto center = Vector3(start + size*.5f, 0.f);
shader.set_tint(x.pass == (uint64_t)pass_mode::pass ? pass_tint : tint);
@@ -190,7 +190,7 @@ void app::draw_collision_boxes()
if (x.pass == (uint64_t)pass_mode::pass)
if (x.id < TILE_COUNT*2+1)
return true;
- Vector2 start(rect.m_min[0], rect.m_min[1]), end(rect.m_max[0], rect.m_max[1]);
+ Vector2 start{rect.m_min}, end{rect.m_max};
auto size = end - start;
auto center = Vector3(start + size*.5f, 0.f);
_wireframe->rect.draw(shader, { center, size, 3 });