From b1270376c9bdb4c91d97cff5554a6e3b8bdc9bad Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Sun, 22 May 2016 19:14:42 +0200 Subject: [PATCH] Indentation fixes (and signed/unsigned comparison fix) to silence GCC 6 warnings --- simgear/canvas/ShivaVG/src/shPipeline.c | 8 ++++++-- simgear/environment/metar.cxx | 7 ++++--- simgear/package/Root.cxx | 2 +- simgear/sound/sample_openal.cxx | 5 ++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/simgear/canvas/ShivaVG/src/shPipeline.c b/simgear/canvas/ShivaVG/src/shPipeline.c index 4eb2fd27..c3eb85cd 100644 --- a/simgear/canvas/ShivaVG/src/shPipeline.c +++ b/simgear/canvas/ShivaVG/src/shPipeline.c @@ -80,8 +80,12 @@ void updateBlendingStateGL(VGContext *c, int alphaIsOne) case VG_BLEND_SRC_OVER: default: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - if (alphaIsOne) glDisable(GL_BLEND); - else glEnable(GL_BLEND); break; + if (alphaIsOne) { + glDisable(GL_BLEND); + } else { + glEnable(GL_BLEND); + } + break; }; } diff --git a/simgear/environment/metar.cxx b/simgear/environment/metar.cxx index 4e96839c..5b497a05 100644 --- a/simgear/environment/metar.cxx +++ b/simgear/environment/metar.cxx @@ -648,10 +648,11 @@ bool SGMetar::scanWeather() weather = pre + weather + post; weather.erase(weather.length() - 1); _weather.push_back(weather); - if( ! w.phenomena.empty() ) + if( ! w.phenomena.empty() ) { _weather2.push_back( w ); - _grpcount++; - return true; + } + _grpcount++; + return true; } diff --git a/simgear/package/Root.cxx b/simgear/package/Root.cxx index d6460ace..1aaf773c 100644 --- a/simgear/package/Root.cxx +++ b/simgear/package/Root.cxx @@ -384,7 +384,7 @@ void Root::refresh(bool aForce) CatalogList toRefresh; CatalogDict::iterator it = d->catalogs.begin(); for (; it != d->catalogs.end(); ++it) { - int age = it->second->ageInSeconds(); + unsigned int age = it->second->ageInSeconds(); if (aForce || (age > maxAgeSeconds())) { toRefresh.push_back(it->second); } diff --git a/simgear/sound/sample_openal.cxx b/simgear/sound/sample_openal.cxx index 95a60775..3bb124bc 100644 --- a/simgear/sound/sample_openal.cxx +++ b/simgear/sound/sample_openal.cxx @@ -260,5 +260,8 @@ SGPath SGSoundSample::file_path() const void SGSoundSample::free_data() { - if ( _data != NULL ) free( _data ); _data = NULL; + if ( _data != NULL ) { + free( _data ); + } + _data = NULL; }