summaryrefslogtreecommitdiff
path: root/src/idl_gen_go.cpp
diff options
context:
space:
mode:
authorFrank Benkstein <frank@benkstein.net>2018-10-16 00:11:31 +0200
committerWouter van Oortmerssen <aardappel@gmail.com>2018-10-15 15:11:31 -0700
commit20396a1760dc7d847a84f153ecde73fde9d70388 (patch)
tree78493cdae6e46eaad523a705c6cb34811473e6f1 /src/idl_gen_go.cpp
parenta3d8391f7be8c29660f77953f2fea11c76864408 (diff)
downloadflatbuffers-20396a1760dc7d847a84f153ecde73fde9d70388.tar.gz
flatbuffers-20396a1760dc7d847a84f153ecde73fde9d70388.tar.bz2
flatbuffers-20396a1760dc7d847a84f153ecde73fde9d70388.zip
disallow c style casts (#4981)
Fixes #4857.
Diffstat (limited to 'src/idl_gen_go.cpp')
-rw-r--r--src/idl_gen_go.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/idl_gen_go.cpp b/src/idl_gen_go.cpp
index 3e204c59..356035f9 100644
--- a/src/idl_gen_go.cpp
+++ b/src/idl_gen_go.cpp
@@ -395,7 +395,7 @@ static void StructBuilderArgs(const StructDef &struct_def,
(nameprefix + (field.name + "_")).c_str(), code_ptr);
} else {
std::string &code = *code_ptr;
- code += (std::string) ", " + nameprefix;
+ code += std::string(", ") + nameprefix;
code += GoIdentity(field.name);
code += " " + GenTypeBasic(field.value.type);
}