diff --git a/nav2_costmap_2d/test/integration/inflation_tests.cpp b/nav2_costmap_2d/test/integration/inflation_tests.cpp index ae3e4d6abf..82d84cce7b 100644 --- a/nav2_costmap_2d/test/integration/inflation_tests.cpp +++ b/nav2_costmap_2d/test/integration/inflation_tests.cpp @@ -129,7 +129,7 @@ void TestNode::validatePointInflation( bin != m.end(); ++bin) { for (unsigned int i = 0; i < bin->second.size(); ++i) { - const CellData & cell = bin->second[i]; + const CellData cell = bin->second[i]; if (!seen[cell.index_]) { seen[cell.index_] = true; unsigned int dx = (cell.x_ > cell.src_x_) ? cell.x_ - cell.src_x_ : cell.src_x_ - cell.x_;