Bug 1336994 - Fix two -Wmax-unsigned-zero warnings (std::max(unsigned int, 0u) r=bz

MozReview-Commit-ID: LX663JqH3lM
This commit is contained in:
Sylvestre Ledru
2017-02-06 16:06:55 +01:00
parent 40207d112a
commit 500cc2a74a

View File

@@ -770,7 +770,6 @@ HTMLImageElement::NaturalHeight()
double density = mResponsiveSelector->GetSelectedImageDensity();
MOZ_ASSERT(density >= 0.0);
height = NSToIntRound(double(height) / density);
height = std::max(height, 0u);
}
return height;
@@ -798,7 +797,6 @@ HTMLImageElement::NaturalWidth()
double density = mResponsiveSelector->GetSelectedImageDensity();
MOZ_ASSERT(density >= 0.0);
width = NSToIntRound(double(width) / density);
width = std::max(width, 0u);
}
return width;