16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

Specify auto as reference where possible

This commit is contained in:
docentYT
2026-05-12 19:16:33 +02:00
parent 4fa148e230
commit 2bb8a64877
3 changed files with 10 additions and 10 deletions

View File

@@ -1021,7 +1021,7 @@ basic_region::on_click( TAnimModel const *Instance ) {
if( Instance->name().empty() || ( Instance->name() == "none" ) ) { return; }
auto const location { Instance->location() };
auto const& location { Instance->location() };
if( point_inside( location ) ) {
section( location ).on_click( Instance );
@@ -1296,7 +1296,7 @@ basic_region::insert( shape_node Shape, scratch_data &Scratchpad, bool const Tra
if( ( false == Scratchpad.location.offset.empty() )
&& ( Scratchpad.location.offset.top() != glm::dvec3( 0, 0, 0 ) ) ) {
// ...and move
auto const offset = Scratchpad.location.offset.top();
auto const& offset = Scratchpad.location.offset.top();
for( auto &vertex : shape.m_data.vertices ) {
vertex.position += offset;
}
@@ -1350,7 +1350,7 @@ basic_region::insert( lines_node Lines, scratch_data &Scratchpad ) {
if( ( false == Scratchpad.location.offset.empty() )
&& ( Scratchpad.location.offset.top() != glm::dvec3( 0, 0, 0 ) ) ) {
// ...and move
auto const offset = Scratchpad.location.offset.top();
auto const &offset = Scratchpad.location.offset.top();
for( auto &vertex : Lines.m_data.vertices ) {
vertex.position += offset;
}
@@ -1726,7 +1726,7 @@ void basic_region::update_poi_geometry()
{
std::vector<gfx::basic_vertex> vertices;
gfx::userdata_array userdata;
for (const auto sem : map::Objects.entries)
for (const auto &sem : map::Objects.entries)
vertices.push_back(std::move(sem->vertex()));
if (!m_map_poipoints) {