Workaround for MSVC not optimizing away Write() in GeneratePixelShader

ShaderConstantProfile and ShaderUid now have an empty implementation
of Write() that uses variadic templates instead of varargs. MSVC is now
able to inline and optimize away this when necessary.
This commit is contained in:
Yuriy O'Donnell 2014-10-16 20:39:58 +02:00
parent 73590b1323
commit 5fdda135d2
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ public:
* Can be used like printf.
* @note In the ShaderCode implementation, this does indeed write the parameter string to an internal buffer. However, you're free to do whatever you like with the parameter.
*/
void Write(const char* fmt, ...) {}
template<typename... Args>
void Write(const char*, Args...) {}
/*
* Returns a read pointer to the internal buffer.