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
Родитель 1bcfcee64a
Коммит d7077c329c
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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