OSDN Git Service

Printing sizes properly
authorAlexis Hetu <sugoi@google.com>
Mon, 11 May 2015 20:42:43 +0000 (16:42 -0400)
committerAlexis Hétu <sugoi@google.com>
Mon, 11 May 2015 21:02:09 +0000 (21:02 +0000)
commitf78e963ddccdf2354b8f9ca29aa5908e4b1efea9
tree2475ec0e88d043d19b41f2bb4574f2b362f4118b
parentc7b05103826dc52f81248d3d278a7af26c322604
Printing sizes properly

Sizes weren't getting printed properly
because of their type. In this case,
primarySize, for example, is an
unsigned char, so it gets printed as if
it were a character instead of a number.
Changing it to "primarySize + '0'" also
fails, because then the result of the
operator+ gets interpreted as an int.
To get it to work, I would need either
something like:
static_cast<char>(primarySize + '0')
or
static_cast<int>(primarySize)
I chose the latter.

Change-Id: Ib0718a7a86ef4314f886b653526240aa788fb3df
Reviewed-on: https://swiftshader-review.googlesource.com/3084
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/compiler/intermOut.cpp