Corrected inline if, which should be evaluated before writing output (#337)

This commit is contained in:
nyronium 2019-06-11 10:13:39 +02:00 committed by Andreas Süßenbach
parent 96299b3a1f
commit cd6e0a6a89

View File

@ -2083,7 +2083,7 @@ void VulkanHppGenerator::writeArgumentPlainType(std::ostream & os, ParamData con
if (paramData.type.type == "char") if (paramData.type.type == "char")
{ {
// it's a const pointer to char -> it's a string -> get the data via c_str() // it's a const pointer to char -> it's a string -> get the data via c_str()
os << parameterName << paramData.optional ? (" ? " + parameterName + "->c_str() : nullptr") : ".c_str()"; os << parameterName << (paramData.optional ? (" ? " + parameterName + "->c_str() : nullptr") : ".c_str()");
} }
else else
{ {