Bug 1218217: bustage fix for static assert r=bustage

on a CLOSED TREE
This commit is contained in:
Randell Jesup 2016-01-14 02:35:45 -05:00
parent ff02460522
commit 4dc034c5c3

View File

@ -74,7 +74,7 @@ size_t CalcBufferSize(VideoType type, int width, int height) {
// 0x7FFF * 0x7FFF * 4 = < 0x100000000
assert(width <= 0x7FFF); // guarantees no overflow and cheaper than multiply
assert(height <= 0x7FFF);
static_assert(std::numeric_limits<std::size_t>::max() >= 0xFFFFFFFF, "size_t max too small!");
assert(std::numeric_limits<std::size_t>::max() >= 0xFFFFFFFF);
// assert() is debug only
if (width > 0x7FFF || height > 0x7FFF) {
return SIZE_MAX; // very likely forces OOM