Skip to content
Snippets Groups Projects
Commit 44e784cd authored by Jeremie Deray's avatar Jeremie Deray Committed by Jeremie Deray
Browse files

const auto&

parent 67abd2a6
No related branches found
No related tags found
1 merge request!126Miscellaneous
......@@ -484,12 +484,12 @@ bool Problem::getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _cova
bool success(true);
int i = 0, j = 0;
for (auto sb_i : _frame_ptr->getStateBlockVec())
for (const auto& sb_i : _frame_ptr->getStateBlockVec())
{
if (sb_i)
{
j = 0;
for (auto sb_j : _frame_ptr->getStateBlockVec())
for (const auto& sb_j : _frame_ptr->getStateBlockVec())
{
if (sb_j)
{
......@@ -506,7 +506,7 @@ bool Problem::getFrameCovariance(FrameBasePtr _frame_ptr, Eigen::MatrixXs& _cova
Eigen::MatrixXs Problem::getFrameCovariance(FrameBasePtr _frame_ptr)
{
Size sz = 0;
for (auto sb : _frame_ptr->getStateBlockVec())
for (const auto& sb : _frame_ptr->getStateBlockVec())
if (sb)
sz += sb->getSize();
Eigen::MatrixXs covariance(sz, sz);
......
......@@ -260,7 +260,7 @@ inline bool SensorBase::process(const CaptureBasePtr capture_ptr)
capture_ptr->setSensorPtr(shared_from_this());
for (const auto processor : processor_list_)
for (const auto& processor : processor_list_)
{
processor->process(capture_ptr);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment