Code review fixes.

This commit is contained in:
Nissim 2017-10-20 14:27:27 -07:00
parent 00c99d3d02
commit 5d0deaf946
3 changed files with 4 additions and 10 deletions

View file

@ -232,7 +232,7 @@ QString EntityItemProperties::getHazeModeAsString() const {
if (_hazeMode < COMPONENT_MODE_ITEM_COUNT) {
return COMPONENT_MODES[_hazeMode].second;
} else {
return COMPONENT_MODES[0].second;
return COMPONENT_MODES[COMPONENT_MODE_INHERIT].second;
}
}
@ -241,7 +241,7 @@ QString EntityItemProperties::getHazeModeString(uint32_t mode) {
if (mode < COMPONENT_MODE_ITEM_COUNT) {
return COMPONENT_MODES[mode].second;
} else {
return COMPONENT_MODES[0].second;
return COMPONENT_MODES[COMPONENT_MODE_INHERIT].second;
}
}

View file

@ -323,11 +323,8 @@ void ZoneEntityItem::resetRenderingPropertiesChanged() {
void ZoneEntityItem::setHazeMode(const uint32_t value) {
if (value < COMPONENT_MODE_ITEM_COUNT) {
_hazeMode = value;
} else {
_hazeMode = 0;
_hazePropertiesChanged = true;
}
_hazePropertiesChanged = true;
}
uint32_t ZoneEntityItem::getHazeMode() const {

View file

@ -260,9 +260,6 @@ void SunSkyStage::setSkybox(const SkyboxPointer& skybox) {
void SunSkyStage::setHazeMode(uint32_t hazeMode) {
if (hazeMode < COMPONENT_MODE_ITEM_COUNT) {
_hazeMode = hazeMode;
} else {
_hazeMode = 0;
invalidate();
}
invalidate();
}