Fix all - 2 cppcheck performance hints

This commit is contained in:
heckflosse
2016-07-06 13:04:24 +02:00
parent a991d53bf3
commit c8779c04f5
43 changed files with 114 additions and 146 deletions

View File

@@ -428,7 +428,7 @@ CameraConst::get_Levels(struct camera_const_levels & lvl, int bw, int iso, float
std::map<int, struct camera_const_levels>::iterator best_it = mLevels[bw].begin();
if (iso > 0) {
for (it = mLevels[bw].begin(); it != mLevels[bw].end(); it++) {
for (it = mLevels[bw].begin(); it != mLevels[bw].end(); ++it) {
if (abs(it->first - iso) <= abs(best_it->first - iso)) {
best_it = it;
} else {
@@ -487,7 +487,7 @@ CameraConst::get_Levels(struct camera_const_levels & lvl, int bw, int iso, float
if (it == mApertureScaling.end()) {
std::map<float, float>::reverse_iterator it;
for (it = mApertureScaling.rbegin(); it != mApertureScaling.rend(); it++) {
for (it = mApertureScaling.rbegin(); it != mApertureScaling.rend(); ++it) {
if (it->first > fnumber) {
scaling = it->second;
} else {