Commit 4cf5bb45 authored by Patrick José Pereira's avatar Patrick José Pereira

QGCCameraControl: Use const reference in for loop

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent 79a18b13
...@@ -1153,7 +1153,7 @@ void ...@@ -1153,7 +1153,7 @@ void
QGCCameraControl::_requestAllParameters() QGCCameraControl::_requestAllParameters()
{ {
//-- Reset receive list //-- Reset receive list
for(QString paramName: _paramIO.keys()) { for(const QString& paramName: _paramIO.keys()) {
if(_paramIO[paramName]) { if(_paramIO[paramName]) {
_paramIO[paramName]->setParamRequest(); _paramIO[paramName]->setParamRequest();
} else { } else {
...@@ -1391,7 +1391,7 @@ QGCCameraControl::_updateRanges(Fact* pFact) ...@@ -1391,7 +1391,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
} }
//-- Parameter update requests //-- Parameter update requests
if(_requestUpdates.contains(pFact->name())) { if(_requestUpdates.contains(pFact->name())) {
for(QString param: _requestUpdates[pFact->name()]) { for(const QString& param: _requestUpdates[pFact->name()]) {
if(!_updatesToRequest.contains(param)) { if(!_updatesToRequest.contains(param)) {
_updatesToRequest << param; _updatesToRequest << param;
} }
...@@ -1406,7 +1406,7 @@ QGCCameraControl::_updateRanges(Fact* pFact) ...@@ -1406,7 +1406,7 @@ QGCCameraControl::_updateRanges(Fact* pFact)
void void
QGCCameraControl::_requestParamUpdates() QGCCameraControl::_requestParamUpdates()
{ {
for(QString param: _updatesToRequest) { for(const QString& param: _updatesToRequest) {
_paramIO[param]->paramRequest(); _paramIO[param]->paramRequest();
} }
_updatesToRequest.clear(); _updatesToRequest.clear();
...@@ -2003,7 +2003,7 @@ QGCCameraControl::_dataReady(QByteArray data) ...@@ -2003,7 +2003,7 @@ QGCCameraControl::_dataReady(QByteArray data)
void void
QGCCameraControl::_paramDone() QGCCameraControl::_paramDone()
{ {
for(QString param: _paramIO.keys()) { for(const QString& param: _paramIO.keys()) {
if(!_paramIO[param]->paramDone()) { if(!_paramIO[param]->paramDone()) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment