activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r648263 - in /activemq/activemq-cpp/decaf/trunk/src: main/decaf/util/UUID.cpp test/decaf/util/UUIDTest.cpp
Date Tue, 15 Apr 2008 14:35:22 GMT
Author: tabish
Date: Tue Apr 15 07:35:20 2008
New Revision: 648263

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

Flushing out decaf build issues on windows.

Modified:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/UUID.cpp
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/util/UUIDTest.cpp

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/UUID.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/UUID.cpp?rev=648263&r1=648262&r2=648263&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/UUID.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/UUID.cpp Tue Apr 15 07:35:20 2008
@@ -44,14 +44,13 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 int UUID::compareTo( const UUID& value ) const {
-    return apr_strnatcmp( (const char*)this->apr_uuid.data,
-                          (const char*)value.apr_uuid.data );
+    return apr_strnatcmp( this->toString().c_str(), value.toString().c_str() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 bool UUID::equals( const UUID& value ) const {
-    return apr_strnatcmp( (const char*)this->apr_uuid.data,
-                          (const char*)value.apr_uuid.data ) == 0 ? true : false;
+    return this->getMostSignificantBits() == value.getMostSignificantBits() &&
+           this->getLeastSignificantBits() == value.getLeastSignificantBits();
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/util/UUIDTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/util/UUIDTest.cpp?rev=648263&r1=648262&r2=648263&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/util/UUIDTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/util/UUIDTest.cpp Tue Apr 15 07:35:20
2008
@@ -39,11 +39,9 @@
     CPPUNIT_ASSERT( randId.compareTo( bytesId ) != 0 );
 
     std::string uuidStr = randId.toString();
-
     UUID strId = UUID::fromString( uuidStr );
 
     CPPUNIT_ASSERT( randId == strId );
-
     CPPUNIT_ASSERT( randId.variant() == 2 );
 
     UUID fromBits( randId.getMostSignificantBits(),



Mime
View raw message