You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2011/04/16 20:55:12 UTC

svn commit: r1094028 - /thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc

Author: roger
Date: Sat Apr 16 18:55:11 2011
New Revision: 1094028

URL: http://svn.apache.org/viewvc?rev=1094028&view=rev
Log:
THRIFT-1060 fb303 build error for cpp
Patch: Sudhir Jorwekar

Modified:
    thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc

Modified: thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc?rev=1094028&r1=1094027&r2=1094028&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc Sat Apr 16 18:55:11 2011
@@ -514,7 +514,11 @@ void t_cpp_generator::generate_enum(t_en
   /**
      Generate a character array of enum names for debugging purposes.
   */
-  std::string prefix = tenum->get_name() + "::";
+  std::string prefix = "";
+  if (!gen_pure_enums_) {
+    prefix = tenum->get_name() + "::";
+  }
+
   f_types_impl_ <<
     indent() << "int _k" << tenum->get_name() << "Values[] =";
   generate_enum_constant_list(f_types_impl_, constants, prefix.c_str(), "", false);