From 3359e3042fd1dd947c4093b90ecce24d1839fbdd Mon Sep 17 00:00:00 2001 From: Casper Date: Wed, 7 Oct 2020 09:46:09 -0700 Subject: Moved C++ to optional_scalars2 and added some tests. (#6162) * Moved C++ to optional_scalars2 and added some tests. Also deleted unused optional_scalars_generated.lobster * Fixed whitespece in C++ gencode & fixed BUILD file * Moved C++ onto optional_scalars2 in the .bat file Co-authored-by: Casper Neo --- src/idl_gen_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index dabc385b..9cb01696 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -1,4 +1,4 @@ -/* + /* * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -1650,7 +1650,7 @@ class CppGenerator : public BaseGenerator { const auto &type = field.value.type; code_.SetValue("PARAM_VALUE", GetDefaultScalarValue(field, false)); if (field.IsScalarOptional()) - code_.SetValue("PARAM_TYPE", GenOptionalDecl(type)); + code_.SetValue("PARAM_TYPE", GenOptionalDecl(type) + " "); else code_.SetValue("PARAM_TYPE", GenTypeWire(type, " ", true)); } -- cgit v1.2.3