summaryrefslogtreecommitdiff
path: root/src/idl_gen_cpp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/idl_gen_cpp.cpp')
-rw-r--r--src/idl_gen_cpp.cpp4
1 files changed, 2 insertions, 2 deletions
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));
}