Skip to content

Commit ac21de5

Browse files
test the #pragma handling
1 parent 31e2899 commit ac21de5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples_tests

src/nbl/asset/utils/waveContext.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,17 @@ struct preprocessing_hooks final : public boost::wave::context_policies::default
9898
)
9999
{
100100
auto optionStr = option.get_value().c_str();
101-
if (strcmp(optionStr, "shader_stage") == 0)
101+
if (strcmp(optionStr,"shader_stage")==0)
102102
{
103103
auto valueIter = values.begin();
104-
if (valueIter == values.end()) {
104+
if (valueIter == values.end())
105+
{
105106
m_logger.log("Pre-processor error:\nMalformed shader_stage pragma. No shaderstage option given", nbl::system::ILogger::ELL_ERROR);
106107
return false;
107108
}
108109
auto shaderStageIdentifier = std::string(valueIter->get_value().c_str());
109-
core::unordered_map<std::string, IShader::E_SHADER_STAGE> stageFromIdent = {
110+
const static core::unordered_map<std::string,IShader::E_SHADER_STAGE> stageFromIdent =
111+
{
110112
{ "vertex", IShader::ESS_VERTEX },
111113
{ "fragment", IShader::ESS_FRAGMENT },
112114
{ "tesscontrol", IShader::ESS_TESSELLATION_CONTROL },

0 commit comments

Comments
 (0)