You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/12/17 23:44:12 UTC

svn commit: r1050519 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks: activemq/util/ benchmark/ decaf/io/ decaf/util/

Author: tabish
Date: Fri Dec 17 22:44:11 2010
New Revision: 1050519

URL: http://svn.apache.org/viewvc?rev=1050519&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/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/BenchmarkBase.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/PerformanceTimer.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/MapBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/activemq/util/PrimitiveMapBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace activemq;
 using namespace activemq::util;
 
 ////////////////////////////////////////////////////////////////////////////////
-PrimitiveMapBenchmark::PrimitiveMapBenchmark() {}
+PrimitiveMapBenchmark::PrimitiveMapBenchmark() : map(), testString(), byteBuffer() {}
 
 ////////////////////////////////////////////////////////////////////////////////
 PrimitiveMapBenchmark::~PrimitiveMapBenchmark() {}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/BenchmarkBase.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/BenchmarkBase.h?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/BenchmarkBase.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/BenchmarkBase.h Fri Dec 17 22:44:11 2010
@@ -41,6 +41,7 @@ namespace benchmark{
 
     public:
 
+        BenchmarkBase() : timer() {}
         virtual ~BenchmarkBase() {}
 
         int getIterations() const {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/PerformanceTimer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/PerformanceTimer.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/PerformanceTimer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/benchmark/PerformanceTimer.cpp Fri Dec 17 22:44:11 2010
@@ -24,8 +24,7 @@ using namespace benchmark;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-PerformanceTimer::PerformanceTimer(){
-    this->numberOfRuns = 0;
+PerformanceTimer::PerformanceTimer() : numberOfRuns(0), times(), startTime(0), endTime(0) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -24,7 +24,7 @@ using namespace decaf::io;
 const int BufferedInputStreamBenchmark::bufferSize = 200000;
 
 ////////////////////////////////////////////////////////////////////////////////
-BufferedInputStreamBenchmark::BufferedInputStreamBenchmark() {
+BufferedInputStreamBenchmark::BufferedInputStreamBenchmark() : buffer(), source() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.h?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/BufferedInputStreamBenchmark.h Fri Dec 17 22:44:11 2010
@@ -35,6 +35,11 @@ namespace io {
         unsigned char* buffer;
         ByteArrayInputStream source;
 
+    private:
+
+        BufferedInputStreamBenchmark( const BufferedInputStreamBenchmark& );
+        BufferedInputStreamBenchmark& operator= ( const BufferedInputStreamBenchmark& );
+
     public:
 
         BufferedInputStreamBenchmark();

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -21,7 +21,10 @@ using namespace decaf;
 using namespace decaf::io;
 
 ////////////////////////////////////////////////////////////////////////////////
-ByteArrayInputStreamBenchmark::ByteArrayInputStreamBenchmark() {
+const int ByteArrayInputStreamBenchmark::bufferSize = 200000;
+
+////////////////////////////////////////////////////////////////////////////////
+ByteArrayInputStreamBenchmark::ByteArrayInputStreamBenchmark() : buffer(), stlBuffer() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.h?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayInputStreamBenchmark.h Fri Dec 17 22:44:11 2010
@@ -32,7 +32,12 @@ namespace io {
 
         unsigned char* buffer;
         std::vector<unsigned char> stlBuffer;
-        static const int bufferSize = 200000;
+        static const int bufferSize;
+
+    private:
+
+        ByteArrayInputStreamBenchmark( const ByteArrayInputStreamBenchmark& );
+        ByteArrayInputStreamBenchmark& operator= ( const ByteArrayInputStreamBenchmark& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -21,7 +21,10 @@ using namespace decaf;
 using namespace decaf::io;
 
 ////////////////////////////////////////////////////////////////////////////////
-ByteArrayOutputStreamBenchmark::ByteArrayOutputStreamBenchmark() {
+const int ByteArrayOutputStreamBenchmark::bufferSize = 200000;
+
+////////////////////////////////////////////////////////////////////////////////
+ByteArrayOutputStreamBenchmark::ByteArrayOutputStreamBenchmark() : buffer(), stlBuffer() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.h?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/ByteArrayOutputStreamBenchmark.h Fri Dec 17 22:44:11 2010
@@ -32,7 +32,12 @@ namespace io {
 
         unsigned char* buffer;
         std::vector<unsigned char> stlBuffer;
-        static const int bufferSize = 200000;
+        static const int bufferSize;
+
+    private:
+
+        ByteArrayOutputStreamBenchmark( const ByteArrayOutputStreamBenchmark& );
+        ByteArrayOutputStreamBenchmark& operator= ( const ByteArrayOutputStreamBenchmark& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -22,7 +22,10 @@ using namespace decaf;
 using namespace decaf::io;
 
 ////////////////////////////////////////////////////////////////////////////////
-DataInputStreamBenchmark::DataInputStreamBenchmark(){
+const int DataInputStreamBenchmark::bufferSize = 200000;
+
+////////////////////////////////////////////////////////////////////////////////
+DataInputStreamBenchmark::DataInputStreamBenchmark() : buffer(), bis() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.h?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/io/DataInputStreamBenchmark.h Fri Dec 17 22:44:11 2010
@@ -32,8 +32,13 @@ namespace io{
     private:
 
         unsigned char* buffer;
-        static const int bufferSize = 200000;
         ByteArrayInputStream bis;
+        static const int bufferSize;
+
+    private:
+
+        DataInputStreamBenchmark( const DataInputStreamBenchmark& );
+        DataInputStreamBenchmark& operator= ( const DataInputStreamBenchmark& );
 
     public:
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/LinkedListBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-LinkedListBenchmark::LinkedListBenchmark() {
+LinkedListBenchmark::LinkedListBenchmark() : intList(), stringList() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/MapBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/MapBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/MapBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/MapBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -24,7 +24,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-MapBenchmark::MapBenchmark() {
+MapBenchmark::MapBenchmark() : stringMap(), intMap() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/PropertiesBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-PropertiesBenchmark::PropertiesBenchmark() {
+PropertiesBenchmark::PropertiesBenchmark() : properties() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/QueueBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-QueueBenchmark::QueueBenchmark(){
+QueueBenchmark::QueueBenchmark() : stringQ(), intQ() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/SetBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-SetBenchmark::SetBenchmark(){
+SetBenchmark::SetBenchmark() : intSet(), stringSet() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp?rev=1050519&r1=1050518&r2=1050519&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-benchmarks/decaf/util/StlListBenchmark.cpp Fri Dec 17 22:44:11 2010
@@ -25,7 +25,7 @@ using namespace decaf::util;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-StlListBenchmark::StlListBenchmark() {
+StlListBenchmark::StlListBenchmark() : intList(), stringList() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////