From 27e2ee0b64d91ead3cca603db613fae797d6f8b9 Mon Sep 17 00:00:00 2001 From: Samuel Kahn <48932506+Kahncode@users.noreply.github.com> Date: Fri, 16 Jul 2021 05:37:34 +0200 Subject: [PATCH] [cpp-ue4] Added support for bool in URL parameters, now writes true/false instead of 1/0 (#9951) --- .../src/main/resources/cpp-ue4/helpers-header.mustache | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache index 67d60535987..cdbf87653d6 100644 --- a/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-ue4/helpers-header.mustache @@ -126,6 +126,16 @@ inline FString ToString(const FString& Value) return Value; } +inline FString ToString(bool Value) +{ + return Value ? TEXT("true") : TEXT("false"); +} + +inline FStringFormatArg ToStringFormatArg(bool Value) +{ + return FStringFormatArg(ToString(Value)); +} + inline FString ToString(const TArray& Value) { return Base64UrlEncode(Value);