Bug 897262 - Avoid waste in nsBaseScreen::CheckMinimumBrightness(). r=bgirard

This commit is contained in:
Po-Chun Chang 2013-08-09 14:36:32 -04:00
parent 657cbf39b4
commit 8ed0fa7fd9

View File

@ -67,7 +67,7 @@ void
nsBaseScreen::CheckMinimumBrightness() nsBaseScreen::CheckMinimumBrightness()
{ {
uint32_t brightness = nsIScreen::BRIGHTNESS_LEVELS; uint32_t brightness = nsIScreen::BRIGHTNESS_LEVELS;
for (uint32_t i = nsIScreen::BRIGHTNESS_LEVELS - 1; i >=0; i--) { for (int32_t i = nsIScreen::BRIGHTNESS_LEVELS - 1; i >=0; i--) {
if (mBrightnessLocks[i] > 0) { if (mBrightnessLocks[i] > 0) {
brightness = i; brightness = i;
break; break;