From cd6e0a6a890204450c03d3e495cb901f88ee20e0 Mon Sep 17 00:00:00 2001 From: nyronium <31919558+nyronium@users.noreply.github.com> Date: Tue, 11 Jun 2019 10:13:39 +0200 Subject: [PATCH] Corrected inline if, which should be evaluated before writing output (#337) --- VulkanHppGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index f61ee1d..dab9b36 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -2083,7 +2083,7 @@ void VulkanHppGenerator::writeArgumentPlainType(std::ostream & os, ParamData con if (paramData.type.type == "char") { // 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 {