OSDN Git Service

Fixed -1 to implicitly unsigned char narrowing error.
authorNicolas Capens <capn@google.com>
Thu, 4 May 2017 18:48:55 +0000 (14:48 -0400)
committerNicolas Capens <capn@google.com>
Fri, 5 May 2017 15:12:39 +0000 (15:12 +0000)
commit0f20653759521be0e9a87579104ce04834495305
tree3f2344f58b8c75884414fb76282d6840163a176d
parent5f7269351ff27a3aa5488617b739c257b4e286a9
Fixed -1 to implicitly unsigned char narrowing error.

C++11 does not allow narrowing a constant expression value to a type
that can't fully represent it. So when char is considered unsigned,
we can't store -1 in it. Explicitly using signed char fixes it.

Change-Id: I5c0e9fe0025659e06291655a12220ab589d5f5bd
Reviewed-on: https://swiftshader-review.googlesource.com/9630
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
src/Shader/Shader.cpp