From: Mark Slee Date: Tue, 16 Jan 2007 23:53:53 +0000 (+0000) Subject: Resolve complex typedefs in Thrift X-Git-Tag: 0.2.0~1555 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=5ec19933cb3f125bcd0ee78b39db218fd357746a;p=common%2Fthrift.git Resolve complex typedefs in Thrift Summary: For function returns Reviewed By: aditya git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664917 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_cpp_generator.h b/compiler/cpp/src/generate/t_cpp_generator.h index 260c8d6a..5a1cbf6f 100644 --- a/compiler/cpp/src/generate/t_cpp_generator.h +++ b/compiler/cpp/src/generate/t_cpp_generator.h @@ -135,6 +135,10 @@ class t_cpp_generator : public t_oop_generator { std::string type_to_enum(t_type* ttype); bool is_complex_type(t_type* ttype) { + while (ttype->is_typedef()) { + ttype = ((t_typedef*)ttype)->get_type(); + } + return ttype->is_container() || ttype->is_struct() ||