AntTweakBar issueshttps://gitlab.vci.rwth-aachen.de:9000/ptrettner/AntTweakBar/-/issues2018-09-16T21:33:53Zhttps://gitlab.vci.rwth-aachen.de:9000/ptrettner/AntTweakBar/-/issues/1TwColors.cpp contains misleading indentation2018-09-16T21:33:53ZChristian MattesTwColors.cpp contains misleading indentationDue to the TweakBar being compiled with -Wall, this breaks builds of e.g. the glow-samples as below:
PS: A similar issue occurs at TwColors.cpp:109ff.
```
FAILED: AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o
/usr/bi...Due to the TweakBar being compiled with -Wall, this breaks builds of e.g. the glow-samples as below:
PS: A similar issue occurs at TwColors.cpp:109ff.
```
FAILED: AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o
/usr/bin/g++ -DAntTweakBar_EXPORTS -D_UNIX -I/home/cmattes/Coding/glow-samples/AntTweakBar/include -g -fPIC -Wall -Werror -std=c++11 -Wno-strict-aliasing -MMD -MT AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o -MF AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o.d -o AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o -c /home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp: In function 'void ColorRGBToHLSf(float, float, float, float*, float*, float*)':
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:22:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_R>0) r = _R; if(r>1) r = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:22:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_R>0) r = _R; if(r>1) r = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:23:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_G>0) g = _G; if(g>1) g = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:23:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_G>0) g = _G; if(g>1) g = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:24:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_B>0) b = _B; if(b>1) b = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:24:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_B>0) b = _B; if(b>1) b = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp: In function 'void ColorHLSToRGBf(float, float, float, float*, float*, float*)':
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:109:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_Hue>0) rh = _Hue; if(rh>360) rh = 360;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:109:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_Hue>0) rh = _Hue; if(rh>360) rh = 360;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:110:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_Light>0) rl = _Light; if(rl>1) rl = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:110:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_Light>0) rl = _Light; if(rl>1) rl = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:111:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if(_Saturation>0) rs = _Saturation; if(rs>1) rs = 1;
^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:111:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if(_Saturation>0) rs = _Saturation; if(rs>1) rs = 1;
^~
cc1plus: all warnings being treated as errors
```
used `g++ (GCC) 6.1.1 20160501`