activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1050526 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util: ./ concurrent/ logging/ zip/
Date Fri, 17 Dec 2010 23:24:29 GMT
Author: tabish
Date: Fri Dec 17 23:24:28 2010
New Revision: 1050526

URL: http://svn.apache.org/viewvc?rev=1050526&view=rev
Log:
Fix a bunch of warnings that get shown with various versions of GCC especially if you turn
on -Weffc++

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Random.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StringTokenizer.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Timer.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/UUID.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CountDownLatch.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/PooledThread.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ThreadPool.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/ConsoleHandler.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Handler.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/LogManager.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Date.cpp Fri Dec 17 23:24:28
2010
@@ -29,17 +29,15 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-Date::Date(){
-    time = System::currentTimeMillis();
+Date::Date() : time( System::currentTimeMillis() ) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Date::Date( long long milliseconds ){
-    this->time = milliseconds;
+Date::Date( long long milliseconds ) : time(milliseconds) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Date::Date( const Date& source ){
+Date::Date( const Date& source ) : time(0) {
     (*this) = source;
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp Fri Dec 17
23:24:28 2010
@@ -42,6 +42,7 @@ namespace util{
 
         decaf::util::StlMap< std::string, std::string > properties;
 
+        PropertiesInternal() : properties() {}
     };
 
 }}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Random.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Random.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Random.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Random.cpp Fri Dec 17 23:24:28
2010
@@ -30,12 +30,12 @@ using namespace decaf::lang::exceptions;
 unsigned long long Random::multiplier = 0x5deece66dLL;
 
 ////////////////////////////////////////////////////////////////////////////////
-Random::Random() {
+Random::Random() : haveNextNextGaussian(false), seed(0), nextNextGaussian(0) {
     setSeed( System::currentTimeMillis() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Random::Random( unsigned long long seed ) {
+Random::Random( unsigned long long seed ) : haveNextNextGaussian(false), seed(0), nextNextGaussian(0)
{
     setSeed( seed );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h Fri Dec 17 23:24:28
2010
@@ -54,9 +54,8 @@ namespace util{
 
         private:
 
-            StlListIterator( const StlListIterator& ) :
-                ListIterator<E>(), current(), prev(), list( NULL ) {}
-            StlListIterator operator= ( const StlListIterator& ) { return *this; }
+            StlListIterator( const StlListIterator& );
+            StlListIterator operator= ( const StlListIterator& );
 
         public:
 
@@ -153,9 +152,8 @@ namespace util{
 
         private:
 
-            ConstStlListIterator( const ConstStlListIterator& ) :
-                ListIterator<E>(), current(), prev(), list( NULL ) {}
-            ConstStlListIterator operator= ( const ConstStlListIterator& ) { return *this;
}
+            ConstStlListIterator( const ConstStlListIterator& );
+            ConstStlListIterator operator= ( const ConstStlListIterator& );
 
         public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h Fri Dec 17 23:24:28
2010
@@ -50,6 +50,11 @@ namespace util{
             typename std::set<E>::iterator previous;
             typename std::set<E>* set;
 
+        private:
+
+            SetIterator( const SetIterator& );
+            SetIterator operator= ( const SetIterator& );
+
         public:
 
             SetIterator( typename std::set<E>* set ) :
@@ -92,6 +97,11 @@ namespace util{
             typename std::set<E>::const_iterator previous;
             const typename std::set<E>* set;
 
+        private:
+
+            ConstSetIterator( const ConstSetIterator& );
+            ConstSetIterator operator= ( const ConstSetIterator& );
+
         public:
 
             ConstSetIterator( const typename std::set<E>* set ) :

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StringTokenizer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StringTokenizer.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StringTokenizer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StringTokenizer.cpp Fri Dec
17 23:24:28 2010
@@ -23,16 +23,8 @@ using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-StringTokenizer::StringTokenizer( const std::string& str,
-                                  const std::string& delim,
-                                  bool returnDelims ) {
-    // store off the data
-    this->str = str;
-    this->delim = delim;
-    this->returnDelims = returnDelims;
-
-    // Start and the beginning
-    pos = 0;
+StringTokenizer::StringTokenizer( const std::string& str, const std::string& delim,
bool returnDelims ) :
+    str(str), delim(delim), returnDelims(returnDelims), pos(0) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Timer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Timer.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Timer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Timer.h Fri Dec 17 23:24:28
2010
@@ -58,6 +58,11 @@ namespace util {
 
         TimerImpl* internal;
 
+    private:
+
+        Timer( const Timer& );
+        Timer operator= ( const Timer& );
+
     public:
 
         Timer();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/UUID.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/UUID.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/UUID.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/UUID.cpp Fri Dec 17 23:24:28
2010
@@ -26,14 +26,12 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-UUID::UUID( long long mostSigBits, long long leastSigBits ) {
+UUID::UUID( long long mostSigBits, long long leastSigBits ) :
+    apr_uuid(), mostSigBits(mostSigBits), leastSigBits(leastSigBits), uuidVersion(0) {
 
     memcpy( &apr_uuid.data[0], &mostSigBits, sizeof( long long ) );
     memcpy( &apr_uuid.data[sizeof(long long)], &leastSigBits, sizeof(long long )
);
 
-    this->mostSigBits = mostSigBits;
-    this->leastSigBits = leastSigBits;
-
     // Version indicator, set when a UUID is generated
     this->uuidVersion = (int)( mostSigBits & 0x000000000000F000LL ) >> 12;
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CountDownLatch.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CountDownLatch.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CountDownLatch.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/CountDownLatch.cpp
Fri Dec 17 23:24:28 2010
@@ -26,8 +26,7 @@ using namespace decaf::util;
 using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
-CountDownLatch::CountDownLatch( int count ) {
-    this->count = count;
+CountDownLatch::CountDownLatch( int count ) : count(count), mutex() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/PooledThread.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/PooledThread.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/PooledThread.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/PooledThread.h
Fri Dec 17 23:24:28 2010
@@ -49,6 +49,11 @@ namespace concurrent{
         // Logger Init
         LOGDECAF_DECLARE(logger)
 
+    private:
+
+        PooledThread( const PooledThread& );
+        PooledThread& operator= ( const PooledThread& );
+
      public:
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ThreadPool.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ThreadPool.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ThreadPool.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ThreadPool.h Fri
Dec 17 23:24:28 2010
@@ -60,6 +60,11 @@ namespace concurrent{
 
     private:
 
+        ThreadPool( const ThreadPool& );
+        ThreadPool& operator= ( const ThreadPool& );
+
+    private:
+
         // Vector of threads that this object has created for its pool.
         std::vector< PooledThread* > pool;
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/ConsoleHandler.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/ConsoleHandler.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/ConsoleHandler.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/ConsoleHandler.cpp
Fri Dec 17 23:24:28 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::util::logging;
 
 ////////////////////////////////////////////////////////////////////////////////
-ConsoleHandler::ConsoleHandler() : StreamHandler( &stream, &formatter ) {
+ConsoleHandler::ConsoleHandler() : StreamHandler( &stream, &formatter ), stream(),
formatter() {
 
     // Defaults level to Info
     setLevel( Level::INFO );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Handler.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Handler.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Handler.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Handler.h Fri Dec
17 23:24:28 2010
@@ -67,6 +67,11 @@ namespace logging{
         // Name of this class used to read properties
         std::string prefix;
 
+    private:
+
+        Handler( const Handler& );
+        Handler& operator= ( const Handler& );
+
     public:
 
         Handler();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/LogManager.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/LogManager.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/LogManager.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/LogManager.cpp Fri
Dec 17 23:24:28 2010
@@ -44,6 +44,9 @@ namespace logging{
     public:
 
         StlMap<string, Logger*> loggers;
+
+        LogManagerInternals() : loggers() {}
+
     };
 
 }}}
@@ -55,8 +58,7 @@ namespace {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-LogManager::LogManager() {
-    this->internal.reset( new LogManagerInternals() );
+LogManager::LogManager() : listeners(), properties(), internal(new LogManagerInternals())
{
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.cpp Fri Dec
17 23:24:28 2010
@@ -28,9 +28,8 @@ using namespace decaf::util;
 using namespace decaf::util::logging;
 
 ////////////////////////////////////////////////////////////////////////////////
-Logger::Logger( const std::string& name ) : level( Level::INHERIT ) {
-
-    this->name = name;
+Logger::Logger( const std::string& name )
+    : name(name), parent(NULL), handlers(), filter(NULL), level(Level::INHERIT), useParentHandlers(true)
{
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h Fri Dec
17 23:24:28 2010
@@ -104,6 +104,11 @@ namespace logging{
         // Using Parent Handlers?
         bool useParentHandlers;
 
+    private:
+
+        Logger( const Logger& );
+        Logger& operator= ( const Logger& );
+
     protected:
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h Fri
Dec 17 23:24:28 2010
@@ -65,6 +65,11 @@ namespace logging{
         // Indicates if the writer has been initialized already
         bool writerNotInitialized;
 
+    private:
+
+        StreamHandler( const StreamHandler& );
+        StreamHandler& operator= ( const StreamHandler& );
+
     public:
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp Fri Dec
17 23:24:28 2010
@@ -147,15 +147,13 @@ const int Deflater::FILTERED = 1;
 const int Deflater::HUFFMAN_ONLY = 2;
 
 ////////////////////////////////////////////////////////////////////////////////
-Deflater::Deflater( int level, bool nowrap ) {
+Deflater::Deflater( int level, bool nowrap ) : data( new DeflaterData() ) {
 
     if( level < DEFAULT_COMPRESSION || level > BEST_COMPRESSION ) {
         throw IllegalArgumentException(
             __FILE__, __LINE__, "Compression level passed was Invalid: %d", level );
     }
 
-    this->data = new DeflaterData();
-
     // Initialize all the ZLib structures.
     DeflaterData::initZLibDeflate( this->data, level, nowrap );
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
Fri Dec 17 23:24:28 2010
@@ -29,33 +29,27 @@ const std::size_t DeflaterOutputStream::
 
 ////////////////////////////////////////////////////////////////////////////////
 DeflaterOutputStream::DeflaterOutputStream( OutputStream* outputStream, bool own ) :
-    FilterOutputStream( outputStream, own ) {
+    FilterOutputStream( outputStream, own ), deflater(new Deflater()), buf(), ownDeflater(true),
isDone(false) {
 
-    this->deflater = new Deflater();
-    this->ownDeflater = true;
     this->buf.resize( DEFAULT_BUFFER_SIZE );
-    this->isDone = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 DeflaterOutputStream::DeflaterOutputStream( OutputStream* outputStream, Deflater* deflater,
bool own, bool ownDeflater )
- :  FilterOutputStream( outputStream, own ) {
+ :  FilterOutputStream( outputStream, own ), deflater(deflater), buf(), ownDeflater(ownDeflater),
isDone(false) {
 
     if( deflater == NULL ) {
         throw NullPointerException(
              __FILE__, __LINE__, "Deflater passed was NULL." );
     }
 
-    this->deflater = deflater;
-    this->ownDeflater = ownDeflater;
     this->buf.resize( DEFAULT_BUFFER_SIZE );
-    this->isDone = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 DeflaterOutputStream::DeflaterOutputStream( OutputStream* outputStream, Deflater* deflater,
                                             int bufferSize, bool own, bool ownDeflater )
- :  FilterOutputStream( outputStream, own ) {
+ :  FilterOutputStream( outputStream, own ), deflater(deflater), buf(), ownDeflater(ownDeflater),
isDone(false) {
 
     if( deflater == NULL ) {
         throw NullPointerException(
@@ -67,10 +61,7 @@ DeflaterOutputStream::DeflaterOutputStre
              __FILE__, __LINE__, "Cannot create a zero sized buffer." );
     }
 
-    this->deflater = deflater;
-    this->ownDeflater = ownDeflater;
     this->buf.resize( bufferSize );
-    this->isDone = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp Fri Dec
17 23:24:28 2010
@@ -124,10 +124,7 @@ namespace zip{
 }}}
 
 ////////////////////////////////////////////////////////////////////////////////
-Inflater::Inflater( bool nowrap ) {
-
-    this->data = new InflaterData();
-
+Inflater::Inflater( bool nowrap ) : data( new InflaterData() ) {
     InflaterData::initZlibInflate( this->data, nowrap );
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp?rev=1050526&r1=1050525&r2=1050526&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp
Fri Dec 17 23:24:28 2010
@@ -32,33 +32,30 @@ const int InflaterInputStream::DEFAULT_B
 
 ////////////////////////////////////////////////////////////////////////////////
 InflaterInputStream::InflaterInputStream( InputStream* inputStream, bool own ) :
-    FilterInputStream( inputStream, own ) {
+    FilterInputStream( inputStream, own ),
+    inflater(new Inflater()), buff(), length(0), atEOF(false), ownInflater(true) {
 
-    this->atEOF = false;
-    this->ownInflater = true;
-    this->inflater = new Inflater();
     this->buff.resize( DEFAULT_BUFFER_SIZE );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 InflaterInputStream::InflaterInputStream( InputStream* inputStream, Inflater* inflater, bool
own, bool ownInflater )
- :  FilterInputStream( inputStream, own ) {
+ :  FilterInputStream( inputStream, own ),
+    inflater(inflater), buff(), length(0), atEOF(false), ownInflater(ownInflater) {
 
     if( inflater == NULL ) {
         throw NullPointerException(
              __FILE__, __LINE__, "Inflater passed was NULL." );
     }
 
-    this->inflater = inflater;
-    this->ownInflater = ownInflater;
     this->buff.resize( DEFAULT_BUFFER_SIZE );
-    this->atEOF = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 InflaterInputStream::InflaterInputStream( InputStream* inputStream, Inflater* inflater,
                                           int bufferSize, bool own, bool ownInflater )
- :  FilterInputStream( inputStream, own ) {
+ :  FilterInputStream( inputStream, own ),
+    inflater(inflater), buff(), length(0), atEOF(false), ownInflater(ownInflater) {
 
     if( inflater == NULL ) {
         throw NullPointerException(
@@ -70,10 +67,7 @@ InflaterInputStream::InflaterInputStream
              __FILE__, __LINE__, "Cannot create a zero sized buffer." );
     }
 
-    this->inflater = inflater;
-    this->ownInflater = ownInflater;
     this->buff.resize( bufferSize );
-    this->atEOF = false;
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message