activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r587147 - /activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp
Date Mon, 22 Oct 2007 16:36:37 GMT
Author: tabish
Date: Mon Oct 22 09:36:27 2007
New Revision: 587147

URL: http://svn.apache.org/viewvc?rev=587147&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-142

Cleaning up the marshaling code.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp?rev=587147&r1=587146&r2=587147&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormat.cpp Mon
Oct 22 09:36:27 2007
@@ -322,8 +322,7 @@
                 "No valid data structure type for object of this type");
         }
 
-        DataStreamMarshaller* dsm =
-            dynamic_cast< DataStreamMarshaller* >( dataMarshallers[type & 0xFF]
);
+        DataStreamMarshaller* dsm = dataMarshallers[type & 0xFF];
 
         if( dsm == NULL ) {
             throw IOException(
@@ -363,8 +362,7 @@
 
         } else {
 
-            DataStreamMarshaller* dsm =
-                dynamic_cast< DataStreamMarshaller* >( dataMarshallers[type & 0xFF]
);
+            DataStreamMarshaller* dsm = dataMarshallers[type & 0xFF];
 
             if( dsm == NULL ) {
                 throw IOException(
@@ -374,7 +372,6 @@
             }
 
             dsm->tightMarshal2( this, o, ds, bs );
-
         }
     }
     AMQ_CATCH_RETHROW( IOException )
@@ -393,9 +390,7 @@
 
             const unsigned char dataType = dis->readByte();
 
-            DataStreamMarshaller* dsm =
-                dynamic_cast< DataStreamMarshaller* >(
-                    dataMarshallers[dataType & 0xFF] );
+            DataStreamMarshaller* dsm = dataMarshallers[dataType & 0xFF];
 
             if( dsm == NULL ) {
                 throw IOException(
@@ -439,9 +434,7 @@
 
             unsigned char dataType = dis->readByte();
 
-            DataStreamMarshaller* dsm =
-                dynamic_cast< DataStreamMarshaller* >(
-                    dataMarshallers[dataType & 0xFF] );
+            DataStreamMarshaller* dsm = dataMarshallers[dataType & 0xFF];
 
             if( dsm == NULL ) {
                 throw IOException(
@@ -478,9 +471,7 @@
 
             dataOut->writeByte( dataType );
 
-            DataStreamMarshaller* dsm =
-                dynamic_cast< DataStreamMarshaller* >(
-                    dataMarshallers[dataType & 0xFF] );
+            DataStreamMarshaller* dsm = dataMarshallers[dataType & 0xFF];
 
             if( dsm == NULL ) {
                 throw IOException(



Mime
View raw message