activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1413913 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/threads/ main/decaf/internal/util/concurrent/ main/decaf/lang/ main/decaf/util/ test/activemq/cmsutil/ test/activemq/commands/ test/activemq/core/ test/activemq/tran...
Date Mon, 26 Nov 2012 22:53:46 GMT
Author: tabish
Date: Mon Nov 26 22:53:39 2012
New Revision: 1413913

URL: http://svn.apache.org/viewvc?rev=1413913&view=rev
Log:
Fix up a bunch of compiler warnings

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/threads/Scheduler.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsAccessorTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsDestinationAccessorTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsTemplateTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnection.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnectionFactory.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyProducer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DynamicDestinationResolverTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/MessageContext.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/SessionPoolTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMapMessageTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQStreamMessageTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/BrokerIdTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/XATransactionIdTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/correlator/ResponseCorrelatorTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/inactivity/InactivityMonitorTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MemoryUsageTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/threads/Scheduler.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/threads/Scheduler.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/threads/Scheduler.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/threads/Scheduler.cpp Mon Nov 26 22:53:39 2012
@@ -38,7 +38,7 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-Scheduler::Scheduler(const std::string& name) : name(name), timer(NULL), tasks() {
+Scheduler::Scheduler(const std::string& name) : mutex(), name(name), timer(NULL), tasks() {
 
     if (name.empty()) {
         throw IllegalArgumentException(__FILE__, __LINE__, "Scheduler name must not be empty.");

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp Mon Nov 26 22:53:39 2012
@@ -116,6 +116,26 @@ namespace {
     };
 
     struct ThreadingLibrary {
+    private:
+
+        ThreadingLibrary(const ThreadingLibrary&);
+        ThreadingLibrary& operator= (const ThreadingLibrary&);
+
+    public:
+
+        ThreadingLibrary() : threadKey(),
+                             selfKey(),
+                             globalLock(),
+                             tlsLock(),
+                             tlsSlots(),
+                             osThreads(),
+                             mainThread(),
+                             activeThreads(),
+                             priorityMapping(),
+                             osThreadId(),
+                             monitors() {
+        }
+
         decaf_tls_key threadKey;
         decaf_tls_key selfKey;
         decaf_mutex_t globalLock;
@@ -1318,6 +1338,10 @@ bool Threading::park( Thread* thread, lo
         }
     }
 
+    if (interrupted) {
+        // TODO
+    }
+
     handle->timerSet = false;
     handle->parked = false;
     handle->interruptible = false;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h Mon Nov 26 22:53:39 2012
@@ -391,7 +391,12 @@ namespace std {
      * can be stored in STL Maps, etc.
      */
     template<typename T>
-    struct less<decaf::lang::Pointer<T> > : public binary_function<decaf::lang::Pointer<T>, decaf::lang::Pointer<T>, bool> {
+    struct less<decaf::lang::Pointer<T> > { //: public binary_function<decaf::lang::Pointer<T>, decaf::lang::Pointer<T>, bool> {
+
+        typedef decaf::lang::Pointer<T> first_argument_type;
+        typedef decaf::lang::Pointer<T> second_argument_type;
+        typedef bool result_type;
+
         bool operator()(const decaf::lang::Pointer<T>& left, const decaf::lang::Pointer<T>& right) const {
             return less<T*> ()(left.get(), right.get());
         }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashCode.h Mon Nov 26 22:53:39 2012
@@ -30,6 +30,16 @@
 namespace decaf {
 namespace util {
 
+    template<typename T>
+    struct HashCodeUnaryBase {
+    public:
+
+        typedef T argument_type;
+        typedef int result_type;
+
+        virtual ~HashCodeUnaryBase();
+    };
+
     /**
      * Base HashCode template, specializations are created from this to account for
      * the various native types.
@@ -37,27 +47,28 @@ namespace util {
      * @since 1.0
      */
     template<typename T>
-    struct HashCode : public std::unary_function<T, int> {
+    struct HashCode : HashCodeUnaryBase<T> {
     public:
+
         int operator()(T arg) const;
     };
 
     template<typename T>
-    struct HashCode<T*> : public std::unary_function<T*, int> {
+    struct HashCode<T*> : public HashCodeUnaryBase<T*> {
         int operator()(T* arg)  const {
             return reinterpret_cast<int>(arg);
         }
     };
 
     template<typename T>
-    struct HashCode<const T&> : public std::unary_function<const T&, int> {
+    struct HashCode<const T&> : HashCodeUnaryBase<const T&> {
         int operator()(const T& arg) const {
             return HashCode<const T*>(&arg);
         }
     };
 
     template<>
-    struct HashCode<bool> : public std::unary_function<bool, int> {
+    struct HashCode<bool> : public HashCodeUnaryBase<bool> {
         int operator()(bool arg) const {
             return arg ? 1231 : 1237;
         }
@@ -65,7 +76,7 @@ namespace util {
 
     #if defined(HAVE_WCHAR_T)
     template<>
-    struct HashCode<unsigned char> : public std::unary_function<unsigned char, int> {
+    struct HashCode<unsigned char> : public HashCodeUnaryBase<unsigned char> {
         int operator()(unsigned char arg) const {
             return (int) arg;
         }
@@ -73,70 +84,70 @@ namespace util {
     #endif
 
     template<>
-    struct HashCode<char> : public std::unary_function<char, int> {
+    struct HashCode<char> : public HashCodeUnaryBase<char> {
         int operator()(char arg) const {
             return (int) arg;
         }
     };
 
     template<>
-    struct HashCode<wchar_t> : public std::unary_function<wchar_t, int> {
+    struct HashCode<wchar_t> : public HashCodeUnaryBase<wchar_t> {
         int operator()(wchar_t arg) const {
             return (int) arg;
         }
     };
 
     template<>
-    struct HashCode<unsigned short> : public std::unary_function<unsigned short, int> {
+    struct HashCode<unsigned short> : public HashCodeUnaryBase<unsigned short> {
         int operator()(unsigned short arg) const {
             return (int) arg;
         }
     };
 
     template<>
-    struct HashCode<short> : public std::unary_function<short, int> {
+    struct HashCode<short> : public HashCodeUnaryBase<short> {
         int operator()(short arg) const {
             return (int) arg;
         }
     };
 
     template<>
-    struct HashCode<unsigned int> : public std::unary_function<unsigned int, int> {
+    struct HashCode<unsigned int> : public HashCodeUnaryBase<unsigned int> {
         int operator()(unsigned int arg) const {
             return (int) arg;
         }
     };
 
     template<>
-    struct HashCode<int> : public std::unary_function<int, int> {
+    struct HashCode<int> : public HashCodeUnaryBase<int> {
         int operator()(int arg) const {
             return arg;
         }
     };
 
     template<>
-    struct HashCode<unsigned long long> : public std::unary_function<unsigned long long, int> {
+    struct HashCode<unsigned long long> : public HashCodeUnaryBase<unsigned long long> {
         int operator()(unsigned long long arg) const {
             return (int) (arg ^ (arg >> 32));
         }
     };
 
     template<>
-    struct HashCode<long long> : public std::unary_function<long long, int> {
+    struct HashCode<long long> : public HashCodeUnaryBase<long long> {
         int operator()(long long arg) const {
             return (int) (arg ^ ((unsigned long long) arg >> 32));
         }
     };
 
     template<>
-    struct HashCode<float> : public std::unary_function<float, int> {
+    struct HashCode<float> : public HashCodeUnaryBase<float> {
         int operator()(float arg) const {
             return decaf::lang::Float::floatToIntBits(arg);
         }
     };
 
     template<>
-    struct HashCode<double> : public std::unary_function<double, int> {
+    struct HashCode<double> : public HashCodeUnaryBase<double> {
         int operator()(double arg) const {
             long long value = decaf::lang::Double::doubleToLongBits(arg);
             return (int) (value ^ ((unsigned long long) value >> 32));
@@ -144,7 +155,7 @@ namespace util {
     };
 
     template<>
-    struct HashCode<std::string> : public std::unary_function<const std::string&, int> {
+    struct HashCode<std::string> : public HashCodeUnaryBase<const std::string&> {
         int operator()(const std::string& arg) const {
             int h = 0;
             if (h == 0 && arg.length() > 0) {
@@ -158,7 +169,7 @@ namespace util {
     };
 
     template<typename T>
-    struct HashCode< decaf::lang::Pointer<T> > : public std::unary_function<decaf::lang::Pointer<T>, int> {
+    struct HashCode< decaf::lang::Pointer<T> > : public HashCodeUnaryBase<decaf::lang::Pointer<T> > {
         int operator()(decaf::lang::Pointer<T> arg) const {
             if (arg != NULL) {
                 return HashCode<T>()(*arg);

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsAccessorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsAccessorTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsAccessorTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsAccessorTest.h Mon Nov 26 22:53:39 2012
@@ -37,7 +37,6 @@ namespace cmsutil{
         CPPUNIT_TEST_SUITE_END();
 
         class MyAccessor : public CmsAccessor {
-
         public:
 
             virtual ~MyAccessor() {}
@@ -54,9 +53,14 @@ namespace cmsutil{
         MyAccessor* accessor;
         DummyConnectionFactory* cf;
 
+    private:
+
+        CmsAccessorTest(const CmsAccessorTest&);
+        CmsAccessorTest& operator= (const CmsAccessorTest&);
+
     public:
 
-        CmsAccessorTest() {}
+        CmsAccessorTest() : accessor(), cf() {}
         virtual ~CmsAccessorTest() {}
 
         virtual void setUp();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsDestinationAccessorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsDestinationAccessorTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsDestinationAccessorTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsDestinationAccessorTest.h Mon Nov 26 22:53:39 2012
@@ -28,15 +28,13 @@ namespace cmsutil{
 
     class DummyConnectionFactory;
 
-    class CmsDestinationAccessorTest : public CppUnit::TestFixture
-    {
+    class CmsDestinationAccessorTest : public CppUnit::TestFixture {
+
         CPPUNIT_TEST_SUITE( CmsDestinationAccessorTest );
         CPPUNIT_TEST( test );
         CPPUNIT_TEST_SUITE_END();
 
-
         class MyAccessor : public CmsDestinationAccessor {
-
         public:
 
             virtual ~MyAccessor() {
@@ -68,9 +66,14 @@ namespace cmsutil{
         MyAccessor* accessor;
         DummyConnectionFactory* cf;
 
+    private:
+
+        CmsDestinationAccessorTest(const CmsDestinationAccessorTest&);
+        CmsDestinationAccessorTest& operator= (const CmsDestinationAccessorTest&);
+
     public:
 
-        CmsDestinationAccessorTest() {}
+        CmsDestinationAccessorTest() : accessor(), cf() {}
         virtual ~CmsDestinationAccessorTest() {}
 
         virtual void setUp();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsTemplateTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsTemplateTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsTemplateTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/CmsTemplateTest.h Mon Nov 26 22:53:39 2012
@@ -33,8 +33,8 @@ namespace cmsutil{
 
     class DummyConnectionFactory;
 
-    class CmsTemplateTest : public CppUnit::TestFixture
-    {
+    class CmsTemplateTest : public CppUnit::TestFixture {
+
         CPPUNIT_TEST_SUITE( CmsTemplateTest );
         CPPUNIT_TEST( testExecuteSession );
         CPPUNIT_TEST( testExecuteProducer );
@@ -47,11 +47,15 @@ namespace cmsutil{
         CPPUNIT_TEST( testReceiveSelected_DestinationName );
         CPPUNIT_TEST_SUITE_END();
 
-
         CmsTemplate* cmsTemplate;
         DummyConnectionFactory* cf;
 
         class MySendListener : public MessageContext::SendListener {
+        private:
+
+            MySendListener(const MySendListener&);
+            MySendListener& operator= (const MySendListener&);
+
         public:
 
             const cms::Destination* dest;
@@ -63,13 +67,7 @@ namespace cmsutil{
             bool noLocal;
             long long timeout;
 
-            MySendListener() {
-                dest = NULL;
-                message = NULL;
-                deliveryMode = 0;
-                priority = 0;
-                ttl = 0LL;
-            }
+            MySendListener() : dest(), message(), deliveryMode(0), priority(), ttl(), selector(), noLocal(), timeout() {}
             virtual ~MySendListener() {}
 
             virtual void onSend(const cms::Destination* destination,
@@ -97,63 +95,69 @@ namespace cmsutil{
         class FailSendListener : public MessageContext::SendListener {
         public:
 
-            FailSendListener() {
-            }
+            FailSendListener() {}
             virtual ~FailSendListener() {}
 
             virtual void onSend(const cms::Destination* destination,
                     cms::Message* message, int deliveryMode, int priority,
-                    long long timeToLive) throw (cms::CMSException){
+                    long long timeToLive) {
                 throw cms::CMSException();
             }
 
             virtual cms::Message* doReceive(const cms::Destination* dest,
-                    const std::string& selector,
-                    bool noLocal,
-                    long long timeout) throw (cms::CMSException){
+                    const std::string& selector, bool noLocal, long long timeout) {
                 throw cms::CMSException();
             }
         };
 
         class MySessionCallback : public SessionCallback {
+        private:
+
+            MySessionCallback(const MySessionCallback&);
+            MySessionCallback& operator= (const MySessionCallback&);
+
         public:
 
             cms::Session* session;
             cms::Session::AcknowledgeMode ackMode;
 
-            MySessionCallback() {
-                session = NULL;
-            }
+            MySessionCallback() :session(), ackMode() {}
             virtual ~MySessionCallback() {}
 
-            virtual void doInCms(cms::Session* session) throw (cms::CMSException) {
+            virtual void doInCms(cms::Session* session) {
                 this->session = session;
                 this->ackMode = session->getAcknowledgeMode();
             }
         };
 
         class MyProducerCallback : public ProducerCallback {
+        private:
+
+            MyProducerCallback(const MyProducerCallback&);
+            MyProducerCallback& operator= (const MyProducerCallback&);
+
         public:
 
             cms::Session* session;
             cms::MessageProducer* producer;
 
-            MyProducerCallback() {
-                session = NULL;
-                producer = NULL;
-            }
+            MyProducerCallback() : session(), producer() {}
             virtual ~MyProducerCallback() {}
 
-            virtual void doInCms(cms::Session* session,
-                    cms::MessageProducer* producer) throw (cms::CMSException) {
+            virtual void doInCms(cms::Session* session, cms::MessageProducer* producer) {
                 this->session = session;
                 this->producer = producer;
             }
         };
 
+    private:
+
+        CmsTemplateTest(const CmsTemplateTest&);
+        CmsTemplateTest& operator= (const CmsTemplateTest&);
+
     public:
 
-        CmsTemplateTest() {}
+        CmsTemplateTest() : cmsTemplate(), cf() {}
         virtual ~CmsTemplateTest() {}
 
         virtual void setUp();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnection.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnection.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnection.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnection.h Mon Nov 26 22:53:39 2012
@@ -34,13 +34,16 @@ namespace cmsutil {
         std::string clientId;
         MessageContext* messageContext;
 
+    private:
+
+        DummyConnection(const DummyConnection&);
+        DummyConnection& operator= (const DummyConnection&);
+
     public:
 
-        DummyConnection(MessageContext* messageContext) {
-            this->messageContext = messageContext;
-        }
-        virtual ~DummyConnection() {
-        }
+        DummyConnection(MessageContext* messageContext) :
+            listener(), transformer(), clientId(), messageContext(messageContext) {}
+        virtual ~DummyConnection() {}
 
         virtual const cms::ConnectionMetaData* getMetaData() const {
             return NULL;
@@ -55,12 +58,11 @@ namespace cmsutil {
         virtual void stop() {
         }
 
-        virtual cms::Session* createSession() throw (cms::CMSException) {
+        virtual cms::Session* createSession() {
             return new DummySession(messageContext);
         }
 
-        virtual cms::Session* createSession(cms::Session::AcknowledgeMode ackMode) throw (cms::CMSException) {
-
+        virtual cms::Session* createSession(cms::Session::AcknowledgeMode ackMode) {
             DummySession* s = new DummySession(messageContext);
             s->setAcknowledgeMode(ackMode);
             return s;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnectionFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnectionFactory.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnectionFactory.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConnectionFactory.h Mon Nov 26 22:53:39 2012
@@ -32,8 +32,15 @@ namespace cmsutil {
         cms::ExceptionListener* listener;
         cms::MessageTransformer* transformer;
 
+    private:
+
+        DummyConnectionFactory(const DummyConnectionFactory&);
+        DummyConnectionFactory& operator= (const DummyConnectionFactory&);
+
     public:
 
+        DummyConnectionFactory() : messageContext(), listener(), transformer() {}
+
         virtual ~DummyConnectionFactory() {}
 
         virtual cms::Connection* createConnection() {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyConsumer.h Mon Nov 26 22:53:39 2012
@@ -35,28 +35,25 @@ namespace cmsutil {
         const cms::Destination* dest;
         bool noLocal;
 
+    private:
+
+        DummyConsumer(const DummyConsumer&);
+        DummyConsumer& operator= (const DummyConsumer&);
+
     public:
 
-        DummyConsumer(MessageContext* messageContext, const cms::Destination* dest, const std::string& selector, bool noLocal) {
-            this->messageContext = messageContext;
-            this->selector = selector;
-            this->noLocal = noLocal;
-            this->dest = dest;
-            this->listener = NULL;
-            this->transformer = NULL;
+        DummyConsumer(MessageContext* messageContext, const cms::Destination* dest, const std::string& selector, bool noLocal) :
+            selector(selector), listener(NULL), messageAvailableListener(NULL), transformer(NULL),
+            messageContext(messageContext), dest(dest), noLocal(noLocal) {
         }
 
-        virtual ~DummyConsumer() {
-        }
+        virtual ~DummyConsumer() {}
 
-        virtual void close() {
-        }
+        virtual void close() {}
 
-        virtual void start() {
-        }
+        virtual void start() {}
 
-        virtual void stop() {
-        }
+        virtual void stop() {}
 
         virtual cms::Message* receive() {
             return messageContext->receive(dest, selector, noLocal, 0);

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyProducer.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyProducer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummyProducer.h Mon Nov 26 22:53:39 2012
@@ -36,23 +36,21 @@ namespace cmsutil {
         MessageContext* messageContext;
         cms::MessageTransformer* transformer;
 
+    private:
+
+        DummyProducer(const DummyProducer&);
+        DummyProducer& operator= (const DummyProducer&);
+
     public:
 
-        DummyProducer(MessageContext* messageContext, const cms::Destination* dest) {
-            this->deliveryMode = 1;
-            this->disableMessageId = false;
-            this->disableMessageTimestamp = false;
-            this->priority = 4;
-            this->ttl = 0L;
-            this->dest = dest;
-            this->messageContext = messageContext;
-            this->transformer = NULL;
-        }
-        virtual ~DummyProducer() {
+        DummyProducer(MessageContext* messageContext, const cms::Destination* dest) :
+            dest(dest), deliveryMode(1), disableMessageId(false), disableMessageTimestamp(false),
+            priority(4), ttl(0LL), messageContext(messageContext), transformer(NULL) {
         }
 
-        virtual void close() {
-        }
+        virtual ~DummyProducer() {}
+
+        virtual void close() {}
 
         virtual void send(cms::Message* message) {
             send(message, deliveryMode, priority, ttl);

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DummySession.h Mon Nov 26 22:53:39 2012
@@ -30,41 +30,36 @@ namespace cmsutil {
     class MessageContext;
 
     class DummySession : public cms::Session {
-
     private:
 
         cms::Session::AcknowledgeMode mode;
         MessageContext* messageContext;
         cms::MessageTransformer* transformer;
 
+    private:
+
+        DummySession(const DummySession&);
+        DummySession& operator= (const DummySession&);
+
     public:
 
-        DummySession(MessageContext* messageContext) {
-            this->mode = cms::Session::AUTO_ACKNOWLEDGE;
-            this->messageContext = messageContext;
-            this->transformer = NULL;
+        DummySession(MessageContext* messageContext) :
+            mode(cms::Session::AUTO_ACKNOWLEDGE), messageContext(messageContext), transformer() {
         }
 
-        virtual ~DummySession() {
-        }
+        virtual ~DummySession() {}
 
-        virtual void close() {
-        }
+        virtual void close() {}
 
-        virtual void start() {
-        }
+        virtual void start() {}
 
-        virtual void stop() {
-        }
+        virtual void stop() {}
 
-        virtual void commit() {
-        }
+        virtual void commit() {}
 
-        virtual void rollback() {
-        }
+        virtual void rollback() {}
 
-        virtual void recover() {
-        }
+        virtual void recover() {}
 
         virtual cms::MessageConsumer* createConsumer(const cms::Destination* destination) {
 
@@ -79,8 +74,7 @@ namespace cmsutil {
             return new DummyConsumer(messageContext, destination, selector, noLocal);
         }
 
-        virtual cms::MessageConsumer* createDurableConsumer(const cms::Topic* destination, const std::string& name, const std::string& selector,
-            bool noLocal = false) {
+        virtual cms::MessageConsumer* createDurableConsumer(const cms::Topic* destination, const std::string& name, const std::string& selector, bool noLocal = false) {
             return NULL;
         }
 
@@ -152,8 +146,7 @@ namespace cmsutil {
             return mode == cms::Session::SESSION_TRANSACTED;
         }
 
-        virtual void unsubscribe(const std::string& name) {
-        }
+        virtual void unsubscribe(const std::string& name) {}
 
         virtual cms::MessageTransformer* getMessageTransformer() const {
             return transformer;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DynamicDestinationResolverTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DynamicDestinationResolverTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DynamicDestinationResolverTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/DynamicDestinationResolverTest.h Mon Nov 26 22:53:39 2012
@@ -24,8 +24,8 @@
 namespace activemq{
 namespace cmsutil{
 
-    class DynamicDestinationResolverTest : public CppUnit::TestFixture
-    {
+    class DynamicDestinationResolverTest : public CppUnit::TestFixture {
+
         CPPUNIT_TEST_SUITE( DynamicDestinationResolverTest );
         CPPUNIT_TEST( testTopics );
         CPPUNIT_TEST( testQueues );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/MessageContext.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/MessageContext.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/MessageContext.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/MessageContext.h Mon Nov 26 22:53:39 2012
@@ -31,7 +31,7 @@ namespace cmsutil {
         class SendListener {
         public:
 
-            virtual ~SendListener(){}
+            virtual ~SendListener() {}
 
             virtual void onSend(const cms::Destination* destination,
                 cms::Message* message, int deliveryMode, int priority,
@@ -45,12 +45,16 @@ namespace cmsutil {
 
     private:
 
+        MessageContext(const MessageContext&);
+        MessageContext& operator= (const MessageContext&);
+
+    private:
+
         SendListener* listener;
 
     public:
 
-        MessageContext() {
-            listener = NULL;
+        MessageContext() : listener(NULL) {
         }
 
         virtual ~MessageContext(){}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/SessionPoolTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/SessionPoolTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/SessionPoolTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/cmsutil/SessionPoolTest.h Mon Nov 26 22:53:39 2012
@@ -24,8 +24,8 @@
 namespace activemq{
 namespace cmsutil{
 
-    class SessionPoolTest : public CppUnit::TestFixture
-    {
+    class SessionPoolTest : public CppUnit::TestFixture {
+
         CPPUNIT_TEST_SUITE( SessionPoolTest );
         CPPUNIT_TEST( testTakeSession );
         CPPUNIT_TEST( testReturnSession );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMapMessageTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMapMessageTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMapMessageTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMapMessageTest.h Mon Nov 26 22:53:39 2012
@@ -52,7 +52,7 @@ namespace commands{
 
     public:
 
-        ActiveMQMapMessageTest() { name = "test-name"; }
+        ActiveMQMapMessageTest() : name("test-name") {}
         virtual ~ActiveMQMapMessageTest() {}
 
         void test();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.cpp Mon Nov 26 22:53:39 2012
@@ -39,8 +39,7 @@ namespace{
     class MyAckHandler : public core::ActiveMQAckHandler {
     public:
 
-        MyAckHandler() {
-            this->wasAcked = false;
+        MyAckHandler() : wasAcked(false) {
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQMessageTest.h Mon Nov 26 22:53:39 2012
@@ -95,7 +95,10 @@ namespace commands{
 
     public:
 
-        ActiveMQMessageTest() {}
+        ActiveMQMessageTest() : readOnlyMessage(), cmsMessageId(), cmsCorrelationID(),
+                                cmsDestination(), cmsReplyTo(), cmsDeliveryMode(), cmsRedelivered(),
+                                cmsType(), cmsExpiration(), cmsPriority(), cmsTimestamp(), consumerIDs() {
+        }
         virtual ~ActiveMQMessageTest() {}
 
         virtual void setUp();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQStreamMessageTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQStreamMessageTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQStreamMessageTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/ActiveMQStreamMessageTest.h Mon Nov 26 22:53:39 2012
@@ -51,7 +51,7 @@ namespace commands {
 
     public:
 
-        ActiveMQStreamMessageTest() {}
+        ActiveMQStreamMessageTest() : buffer() {}
         virtual ~ActiveMQStreamMessageTest() {}
 
         void setUp();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/BrokerIdTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/BrokerIdTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/BrokerIdTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/BrokerIdTest.cpp Mon Nov 26 22:53:39 2012
@@ -23,13 +23,14 @@
 #include <decaf/lang/Comparable.h>
 
 ////////////////////////////////////////////////////////////////////////////////
-namespace activemq{
-namespace commands{
+namespace activemq {
+namespace commands {
+
+    struct BrokerIdComparitor {
+        typedef activemq::commands::BrokerId* first_argument_type;
+        typedef activemq::commands::BrokerId* second_argument_type;
+        typedef bool result_type;
 
-    struct BrokerIdComparitor :
-        public std::binary_function< activemq::commands::BrokerId*,
-                                     activemq::commands::BrokerId*, bool>
-    {
         bool operator() ( const activemq::commands::BrokerId* left,
                           const activemq::commands::BrokerId* right ) const
         {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/XATransactionIdTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/XATransactionIdTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/XATransactionIdTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/commands/XATransactionIdTest.cpp Mon Nov 26 22:53:39 2012
@@ -39,7 +39,7 @@ namespace {
 
     public:
 
-        DummyXid() {
+        DummyXid() : branchQualifier(), globalTransactionId() {
 
             for(int i = 0; i < Xid::MAXBQUALSIZE; ++i ) {
                 this->branchQualifier.push_back( (unsigned char)i );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.cpp Mon Nov 26 22:53:39 2012
@@ -48,10 +48,7 @@ namespace core{
 
     public:
 
-        MyTransportListener() {
-            this->interrupted = false;
-            this->resumed = true;
-        }
+        MyTransportListener() : interrupted(false), resumed(true) {}
 
         bool isInterrupted() const {
             return this->interrupted;
@@ -62,11 +59,9 @@ namespace core{
         }
 
         virtual void onCommand( const Pointer<Command> command ) {
-
         }
 
         virtual void onException( const decaf::lang::Exception& ex ) {
-
         }
 
         virtual void transportInterrupted() {
@@ -76,7 +71,6 @@ namespace core{
         virtual void transportResumed() {
             this->resumed = true;
         }
-
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionFactoryTest.h Mon Nov 26 22:53:39 2012
@@ -44,7 +44,7 @@ namespace core{
         std::string password;
         std::string clientId;
 
-        ActiveMQConnectionFactoryTest(){
+        ActiveMQConnectionFactoryTest() : username(), password(), clientId() {
             username = "timmy";
             password = "auth";
             clientId = "12345";

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.cpp Mon Nov 26 22:53:39 2012
@@ -50,11 +50,14 @@ namespace core{
 
         commands::Command* cmd;
 
+    private:
+
+        MyCommandListener(const MyCommandListener&);
+        MyCommandListener& operator= (const MyCommandListener&);
+
     public:
 
-        MyCommandListener(){
-            cmd = NULL;
-        }
+        MyCommandListener() : cmd(NULL) {}
         virtual ~MyCommandListener(){}
 
         virtual void onCommand( commands::Command* command ){
@@ -69,7 +72,7 @@ namespace core{
 
     public:
 
-        MyExceptionListener(){ caughtOne = false; }
+        MyExceptionListener() : caughtOne(false) {}
         virtual ~MyExceptionListener(){}
 
         virtual void onException(const cms::CMSException& ex AMQCPP_UNUSED){
@@ -77,13 +80,14 @@ namespace core{
         }
     };
 
-    class MyDispatcher : public Dispatcher
-    {
+    class MyDispatcher : public Dispatcher {
     public:
 
         std::vector< decaf::lang::Pointer<commands::Message> > messages;
 
     public:
+
+        MyDispatcher() : messages() {}
         virtual ~MyDispatcher(){}
 
         virtual void dispatch( const decaf::lang::Pointer<commands::MessageDispatch>& data )

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.cpp Mon Nov 26 22:53:39 2012
@@ -45,8 +45,7 @@ using namespace decaf::lang;
 namespace activemq{
 namespace core{
 
-    class MyCMSMessageListener : public cms::MessageListener
-    {
+    class MyCMSMessageListener : public cms::MessageListener {
     public:
 
         std::vector< Pointer<cms::Message> > messages;
@@ -55,8 +54,7 @@ namespace core{
 
     public:
 
-        MyCMSMessageListener( bool ack = false ){
-            this->ack = ack;
+        MyCMSMessageListener(bool ack = false) : messages(), mutex(), ack(ack) {
         }
 
         virtual ~MyCMSMessageListener() {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.h?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQSessionTest.h Mon Nov 26 22:53:39 2012
@@ -59,7 +59,7 @@ namespace core{
 
         public:
 
-            MyExceptionListener(){ caughtOne = false; }
+            MyExceptionListener() : caughtOne(false) {}
             virtual ~MyExceptionListener(){}
 
             virtual void onException(const cms::CMSException& ex AMQCPP_UNUSED){
@@ -71,6 +71,11 @@ namespace core{
         transport::mock::MockTransport* dTransport;
         MyExceptionListener exListener;
 
+    private:
+
+        ActiveMQSessionTest(const ActiveMQSessionTest&);
+        ActiveMQSessionTest& operator= (const ActiveMQSessionTest&);
+
     public:    // CPPUNIT Method Overrides.
 
         void setUp();
@@ -83,7 +88,7 @@ namespace core{
 
     public:
 
-        ActiveMQSessionTest() {}
+        ActiveMQSessionTest() : connection(), dTransport(), exListener() {}
         virtual ~ActiveMQSessionTest() {}
 
         void testAutoAcking();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/IOTransportTest.cpp Mon Nov 26 22:53:39 2012
@@ -42,7 +42,8 @@ using namespace decaf::lang::exceptions;
 ////////////////////////////////////////////////////////////////////////////////
 class MyCommand : public commands::BaseCommand {
 public:
-    MyCommand(){ c = 0; }
+
+    MyCommand() : c(0) {}
     virtual ~MyCommand(){}
 
     char c;
@@ -65,7 +66,7 @@ public:
 class MyWireFormat : public wireformat::WireFormat {
 public:
 
-    MyWireFormat(){ throwException = false; }
+    MyWireFormat() : throwException(false) {}
     virtual ~MyWireFormat(){}
 
     bool throwException;
@@ -85,8 +86,7 @@ public:
     }
 
     virtual Pointer<commands::Command> unmarshal( const activemq::transport::Transport* transport AMQCPP_UNUSED,
-                                                  decaf::io::DataInputStream* inputStream )
-        throw ( IOException ){
+                                                  decaf::io::DataInputStream* inputStream ) {
 
         try{
             if( throwException ){
@@ -139,7 +139,6 @@ public:
     virtual void marshal( const Pointer<commands::Command> command,
                           const activemq::transport::Transport* transport AMQCPP_UNUSED,
                           decaf::io::DataOutputStream* outputStream )
-        throw (IOException)
     {
         try{
 
@@ -170,16 +169,16 @@ public:
 
     decaf::util::concurrent::Mutex mutex;
     bool caughtOne;
+    std::string str;
 
-    MyTransportListener() : latch(1), caughtOne( false ) {}
-    MyTransportListener( unsigned int num ) : latch( num ), caughtOne( false ) {}
+    MyTransportListener() : latch(1), mutex(), caughtOne(false), str() {}
+    MyTransportListener(unsigned int num) : latch(num), mutex(), caughtOne(false), str() {}
     virtual ~MyTransportListener(){}
 
     virtual void await() {
         latch.await();
     }
 
-    std::string str;
     virtual void onCommand( const Pointer<commands::Command> command ){
         const MyCommand* cmd = dynamic_cast<const MyCommand*>(command.get());
         str += cmd->c;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/correlator/ResponseCorrelatorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/correlator/ResponseCorrelatorTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/correlator/ResponseCorrelatorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/correlator/ResponseCorrelatorTest.cpp Mon Nov 26 22:53:39 2012
@@ -44,6 +44,9 @@ namespace correlator{
 
     public:
 
+        MyCommand() : commandId() {}
+        virtual ~MyCommand() {}
+
         virtual std::string toString() const{ return ""; }
 
         virtual unsigned char getDataStructureType() const { return 1; }
@@ -69,16 +72,18 @@ namespace correlator{
         bool done;
         std::queue< Pointer<commands::Command> > requests;
 
+    private:
+
+        MyTransport(const MyTransport&);
+        MyTransport& operator= (const MyTransport&);
+
     public:
 
-        MyTransport(){
-            listener = NULL;
-            thread = NULL;
-            done = false;
+        MyTransport() :
+            listener(NULL), thread(NULL), mutex(), startedMutex(), done(false), requests() {
         }
 
         virtual ~MyTransport(){
-
             close();
         }
 
@@ -271,10 +276,9 @@ namespace correlator{
 
     public:
 
-        MyListener(){
-            exCount = 0;
-        }
+        MyListener() : exCount(0), commands(), mutex() {}
         virtual ~MyListener(){}
+
         virtual void onCommand( const Pointer<Command> command ){
 
             synchronized( &mutex ){
@@ -301,17 +305,18 @@ namespace correlator{
         Pointer<MyCommand> cmd;
         Pointer<Response> resp;
 
+    private:
+
+        RequestThread(const RequestThread&);
+        RequestThread& operator= (const RequestThread&);
+
     public:
 
-        RequestThread(){
-            transport = NULL;
-            cmd.reset( new MyCommand() );
-        }
+        RequestThread() : transport(NULL), cmd(new MyCommand()), resp() {}
 
-        virtual ~RequestThread(){
-        }
+        virtual ~RequestThread() {}
 
-        void setTransport( Transport* transport ){
+        void setTransport(Transport* transport) {
             this->transport = transport;
         }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/inactivity/InactivityMonitorTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/inactivity/InactivityMonitorTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/inactivity/InactivityMonitorTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/inactivity/InactivityMonitorTest.cpp Mon Nov 26 22:53:39 2012
@@ -52,30 +52,29 @@ namespace {
 
     public:
 
-        MyTransportListener() : exceptionFired( false ), commandsReceived( 0 ) {
-        }
+        MyTransportListener() : exceptionFired(false), commandsReceived(0) {}
+
+        virtual ~MyTransportListener() {}
 
-        virtual void onCommand( const Pointer<Command> command ) {
+        virtual void onCommand(const Pointer<Command> command) {
             this->commandsReceived++;
         }
 
-        virtual void onException( const decaf::lang::Exception& ex ) {
+        virtual void onException(const decaf::lang::Exception& ex) {
             this->exceptionFired = true;
         }
 
         virtual void transportInterrupted() {
-
         }
 
         virtual void transportResumed() {
-
         }
     };
 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-InactivityMonitorTest::InactivityMonitorTest() {
+InactivityMonitorTest::InactivityMonitorTest() : transport(), localWireFormatInfo() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MemoryUsageTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MemoryUsageTest.cpp?rev=1413913&r1=1413912&r2=1413913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MemoryUsageTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/MemoryUsageTest.cpp Mon Nov 26 22:53:39 2012
@@ -27,22 +27,28 @@ using namespace activemq::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-class UsageRunner : public decaf::lang::Runnable {
-private:
+namespace {
 
-    MemoryUsage* usage;
+    class UsageRunner : public decaf::lang::Runnable {
+    private:
 
-public:
+        UsageRunner(const UsageRunner&);
+        UsageRunner& operator= (const UsageRunner&);
 
-    UsageRunner( MemoryUsage* usage ) {
-        this->usage = usage;
-    }
-
-    virtual void run(){
-        Thread::sleep( 50 );
-        this->usage->decreaseUsage( this->usage->getUsage() );
-    }
-};
+    private:
+
+        MemoryUsage* usage;
+
+    public:
+
+        UsageRunner(MemoryUsage* usage) : usage(usage) {}
+
+        virtual void run() {
+            Thread::sleep(50);
+            this->usage->decreaseUsage(this->usage->getUsage());
+        }
+    };
+}
 
 ////////////////////////////////////////////////////////////////////////////////
 void MemoryUsageTest::testCTors() {



Mime
View raw message