activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r925794 - /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
Date Sun, 21 Mar 2010 15:17:39 GMT
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("        }");
                 }
             }



Mime
View raw message