Thrift-1379: fix uninitialized enum values in thrift C++ objects
authorJake Farrell <jfarrell@apache.org>
Fri, 7 Oct 2011 00:25:46 +0000 (00:25 +0000)
committerJake Farrell <jfarrell@apache.org>
Fri, 7 Oct 2011 00:25:46 +0000 (00:25 +0000)
commit581481f232be3f70945f2333c9a53ae5ea5346f8
tree1e008ddf29ac8fe53e4cda25e4287c9b3bc2c87c
parent51700649d0adbd0bbdf407ba251170a29f04e691
Thrift-1379: fix uninitialized enum values in thrift C++ objects
Client: cpp
Patch: Dave Watson

The thrift-generated code for C++ class objects does not provide any
initialization for enum values, so they wind up containing random/uninitialized
data. This causes problems when clients do not send argument data, as the server
receives random data rather than zero for unpassed args.
Enums should be initialized to zero.

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179909 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_cpp_generator.cc