try another way of fixing _spare warning

This commit is contained in:
Seth Alves 2018-09-28 14:53:05 -07:00
parent b69d0f3997
commit cb04894e33

View file

@ -118,11 +118,12 @@ public:
uint8 _function = LESS;
uint8 _writeMask = true;
uint8 _enabled = false;
__attribute__((unused)) // _spare is here to to affect alignment
uint8 _spare = 0;
uint8 _spare = 0; // _spare is here to to affect alignment
public:
DepthTest(bool enabled = false, bool writeMask = true, ComparisonFunction func = LESS) :
_function(func), _writeMask(writeMask), _enabled(enabled) {}
_function(func), _writeMask(writeMask), _enabled(enabled) {
(void)_spare; // to avoid unusued variable warning
}
bool isEnabled() const { return _enabled != 0; }
ComparisonFunction getFunction() const { return ComparisonFunction(_function); }