Commit 5cf1e9a3 by Nicolas Capens Committed by Nicolas Capens

Fix implicit narrowing cast

Bug: b/152777669 Change-Id: I271ca0ecb5ff8461530fd6388378524970a2bc2b Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43228 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 45755df2
...@@ -2681,7 +2681,7 @@ namespace sw ...@@ -2681,7 +2681,7 @@ namespace sw
// and stencil operations also read 8 bytes per four 8-bit stencil values, // and stencil operations also read 8 bytes per four 8-bit stencil values,
// so we have to allocate 4 extra bytes to avoid buffer overruns. // so we have to allocate 4 extra bytes to avoid buffer overruns.
// TODO(b/145229887): Eliminate if possible, or don't hard-code. // TODO(b/145229887): Eliminate if possible, or don't hard-code.
return size + 4; return static_cast<size_t>(size) + 4;
} }
case FORMAT_YV12_BT601: case FORMAT_YV12_BT601:
case FORMAT_YV12_BT709: case FORMAT_YV12_BT709:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment