Avoid costly indirect calls of tStringInput::(un)?getch through TPpContext
authorMaxime Coste <maxime.coste@havok.com>
Wed, 11 Nov 2015 17:46:18 +0000 (17:46 +0000)
committerMaxime Coste <maxime.coste@havok.com>
Wed, 11 Nov 2015 18:24:37 +0000 (18:24 +0000)
commit6998987ecff4b4e8e3f03f43a1f6e6deadb8863f
tree7f5ce786b7367956a375ffffe352d80ec15eaa84
parent29051bd148a1cac0e6a131753b9cf3a0550f3967
Avoid costly indirect calls of tStringInput::(un)?getch through TPpContext

There is no calls to the TPpContext that could change the current input,
so every calls to pp->getChar and pp->ungetChar ultimately call this->getch
and this->ungetch while adding overhead of virtual calls and vector::back.
glslang/MachineIndependent/preprocessor/PpScanner.cpp