Author: tabish
Date: Mon Jun  2 13:06:56 2008
New Revision: 662544

URL: http://svn.apache.org/viewvc?rev=662544&view=rev
Log:
Cleanup code for up-coming 2.2 release, fixing warnings etc on windows.

Modified:
    
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/FloatArrayBufferTest.cpp
    
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/IntArrayBufferTest.cpp
    
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.cpp
    
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.h

Modified: 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/FloatArrayBufferTest.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/FloatArrayBufferTest.cpp?rev=662544&r1=662543&r2=662544&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/FloatArrayBufferTest.cpp
 (original)
+++ 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/FloatArrayBufferTest.cpp
 Mon Jun  2 13:06:56 2008
@@ -553,7 +553,7 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find("Float") != string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) 
!= string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) != 
string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() 
) ) != string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() 
) ) != string::npos );
 }

Modified: 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/IntArrayBufferTest.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/IntArrayBufferTest.cpp?rev=662544&r1=662543&r2=662544&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/IntArrayBufferTest.cpp 
(original)
+++ 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/IntArrayBufferTest.cpp 
Mon Jun  2 13:06:56 2008
@@ -509,7 +509,7 @@
 
     for( std::size_t i = 0; i < testBuffer1->capacity(); i++ ) {
         CPPUNIT_ASSERT( testBuffer1->position() == 0 );
-        IntBuffer& ret = testBuffer1->put(i, i );
+        IntBuffer& ret = testBuffer1->put( i, (int)i );
         CPPUNIT_ASSERT( testBuffer1->get(i) == (int)i );
         CPPUNIT_ASSERT( &ret == testBuffer1 );
     }
@@ -553,7 +553,7 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find("Int") != string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) 
!= string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) != 
string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() 
) ) != string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() 
) ) != string::npos );
 }

Modified: 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.cpp
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.cpp?rev=662544&r1=662543&r2=662544&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.cpp
 (original)
+++ 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.cpp
 Mon Jun  2 13:06:56 2008
@@ -509,7 +509,7 @@
 
     for( std::size_t i = 0; i < testBuffer1->capacity(); i++ ) {
         CPPUNIT_ASSERT( testBuffer1->position() == 0 );
-        ShortBuffer& ret = testBuffer1->put(i, i );
+        ShortBuffer& ret = testBuffer1->put( i, (short)i );
         CPPUNIT_ASSERT( testBuffer1->get(i) == (short)i );
         CPPUNIT_ASSERT( &ret == testBuffer1 );
     }
@@ -553,7 +553,7 @@
 
     std::string str = testBuffer1->toString();
     CPPUNIT_ASSERT( str.find("Short") != string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->position() ) ) 
!= string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->limit() ) ) != 
string::npos );
-    CPPUNIT_ASSERT( str.find( Integer::toString( testBuffer1->capacity() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->position() 
) ) != string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->limit() ) ) 
!= string::npos );
+    CPPUNIT_ASSERT( str.find( Integer::toString( (int)testBuffer1->capacity() 
) ) != string::npos );
 }

Modified: 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.h
URL: 
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.h?rev=662544&r1=662543&r2=662544&view=diff
==============================================================================
--- 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.h 
(original)
+++ 
activemq/activemq-cpp/trunk/src/test/decaf/internal/nio/ShortArrayBufferTest.h 
Mon Jun  2 13:06:56 2008
@@ -113,7 +113,7 @@
 
         void loadTestData2( short* array, std::size_t offset, std::size_t 
length ) {
             for( std::size_t i = 0; i < length; i++ ) {
-                array[offset + i] = (short)length - i;
+                array[offset + i] = (short)(length - i);
             }
         }
 
@@ -127,7 +127,7 @@
         void loadTestData2( decaf::nio::ShortBuffer* buf ) {
             buf->clear();
             for( std::size_t i = 0; i < buf->capacity(); i++ ) {
-                buf->put(i, (short) buf->capacity() - i);
+                buf->put(i, (short)( buf->capacity() - i) );
             }
         }
 


Reply via email to