Follow-up of 6b041429f6
- Fixed warning
This commit is contained in:
parent
6b041429f6
commit
f6c7fefec2
@ -318,8 +318,7 @@ void Bed3D::init_triangles()
|
|||||||
|
|
||||||
Vec2f min = triangles.front();
|
Vec2f min = triangles.front();
|
||||||
Vec2f max = min;
|
Vec2f max = min;
|
||||||
for (const Vec2f v : triangles) {
|
for (const Vec2f& v : triangles) {
|
||||||
const Vec3f p = { v.x(), v.y(), GROUND_Z };
|
|
||||||
min = min.cwiseMin(v).eval();
|
min = min.cwiseMin(v).eval();
|
||||||
max = max.cwiseMax(v).eval();
|
max = max.cwiseMax(v).eval();
|
||||||
}
|
}
|
||||||
@ -332,7 +331,7 @@ void Bed3D::init_triangles()
|
|||||||
inv_size.y() *= -1.0f;
|
inv_size.y() *= -1.0f;
|
||||||
|
|
||||||
unsigned int vertices_counter = 0;
|
unsigned int vertices_counter = 0;
|
||||||
for (const Vec2f v : triangles) {
|
for (const Vec2f& v : triangles) {
|
||||||
const Vec3f p = { v.x(), v.y(), GROUND_Z };
|
const Vec3f p = { v.x(), v.y(), GROUND_Z };
|
||||||
init_data.add_vertex(p, (Vec2f)v.cwiseProduct(inv_size).eval());
|
init_data.add_vertex(p, (Vec2f)v.cwiseProduct(inv_size).eval());
|
||||||
++vertices_counter;
|
++vertices_counter;
|
||||||
|
Loading…
Reference in New Issue
Block a user