summaryrefslogtreecommitdiff
path: root/src/cppunit/Exception.cpp
diff options
context:
space:
mode:
authorTobias Lippert <drtl@fastmail.fm>2013-08-15 22:27:46 +0200
committerTor Lillqvist <tml@iki.fi>2013-08-15 20:57:12 +0000
commit773ba28bfb3ce86dd2f9704d39d60b00d5f30b77 (patch)
treefad0365797295712e5c4d5a34f4c5f5dbcead06e /src/cppunit/Exception.cpp
parent89abdff7b0dcba8c050ce9ef7f68760511814f2f (diff)
downloadcppunit-773ba28bfb3ce86dd2f9704d39d60b00d5f30b77.tar.gz
Bug # 51154: cppunit warning cleaning
This patch allows to compile the code with gcc's -Weffc++ It consists mostly of making copy constructors and assignment operators explicit and private, and of initializing all members in initializer lists. Change-Id: I6f1cae812c58e3791c2386a1288501cf2f559610 Reviewed-on: https://gerrit.libreoffice.org/5424 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'src/cppunit/Exception.cpp')
-rw-r--r--src/cppunit/Exception.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp
index 3bbe24b..6685480 100644
--- a/src/cppunit/Exception.cpp
+++ b/src/cppunit/Exception.cpp
@@ -19,20 +19,20 @@ const long Exception::UNKNOWNLINENUMBER = -1;
Exception::Exception( const Exception &other )
: std::exception( other )
+ , m_message(other.m_message)
+ , m_sourceLine(other.m_sourceLine)
+ , m_whatMessage(other.m_whatMessage)
{
- m_message = other.m_message;
- m_sourceLine = other.m_sourceLine;
}
-
Exception::Exception( const Message &message,
const SourceLine &sourceLine )
: m_message( message )
, m_sourceLine( sourceLine )
+ , m_whatMessage()
{
}
-
#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
Exception::Exception( std::string message,
long lineNumber,