You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/03/21 16:17:39 UTC

svn commit: r925794 - /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java

Author: tabish
Date: Sun Mar 21 15:17:37 2010
New Revision: 925794

URL: http://svn.apache.org/viewvc?rev=925794&view=rev
Log:
Update the code generator to fix some warnings in the generated code.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java?rev=925794&r1=925793&r2=925794&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java Sun Mar 21 15:17:37 2010
@@ -300,7 +300,7 @@ public class AmqCppMarshallingClassesGen
                 else {
                     out.println("        if( bs->readBoolean() ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size() );");
-                    out.println("            dataOut->write( (const unsigned char*)(&" + getter + "[0]), " + getter + ".size(), 0, " + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&" + getter + "[0]), (int)" + getter + ".size(), 0, (int)" + getter + ".size() );");
                     out.println("        }");
                 }
             }
@@ -467,7 +467,7 @@ public class AmqCppMarshallingClassesGen
                     out.println("        dataOut->write( " + getter + ".size() != 0 );");
                     out.println("        if( " + getter + ".size() != 0 ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size() );");
-                    out.println("            dataOut->write( (const unsigned char*)(&" + getter + "[0]), " + getter + ".size(), 0, " + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&" + getter + "[0]), (int)" + getter + ".size(), 0, (int)" + getter + ".size() );");
                     out.println("        }");
                 }
             }