thrift-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryanduxb...@apache.org
Subject svn commit: r1153270 - /thrift/trunk/compiler/cpp/src/generate/t_javame_generator.cc
Date Tue, 02 Aug 2011 20:51:56 GMT
Author: bryanduxbury
Date: Tue Aug  2 20:51:55 2011
New Revision: 1153270

URL: http://svn.apache.org/viewvc?rev=1153270&view=rev
Log:
THRIFT-1253. javame: Code generated for maps is not compiling

Fix a casting issue.

Patch: Raphael Bartement

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

Modified: thrift/trunk/compiler/cpp/src/generate/t_javame_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_javame_generator.cc?rev=1153270&r1=1153269&r2=1153270&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_javame_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_javame_generator.cc Tue Aug  2 20:51:55 2011
@@ -2858,7 +2858,7 @@ void t_javame_generator::generate_serial
   t_field kfield(tmap->get_key_type(), iter);
   generate_serialize_field(out, &kfield, "");
   string val_type = type_name(tmap->get_val_type(), true, false);
-  t_field vfield(tmap->get_val_type(), "(" + val_type + ")" + map + ".get(" + iter + ")");
+  t_field vfield(tmap->get_val_type(), "((" + val_type + ")" + map + ".get(" + iter +
"))");
   generate_serialize_field(out, &vfield, "");
 }
 



Mime
View raw message