summaryrefslogtreecommitdiff
path: root/include/cppunit/SourceLine.h
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2004-11-19 19:00:44 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2004-11-19 19:00:44 +0000
commit707400b4c6de94a22075b17d8d4ef08fa75813d9 (patch)
tree08bcc0e2b57394ba592b82fafa810c15f4114c29 /include/cppunit/SourceLine.h
parente321ba14ae0d69ee07bb90fdb6393b8173809644 (diff)
downloadcppunit-707400b4c6de94a22075b17d8d4ef08fa75813d9.tar.gz
added specific copy constructor implementatin to ensure string buffer are detached during copy (therefore providing thread-safe copy constructor for non thread-safe std::string copy constructor implementation).
Diffstat (limited to 'include/cppunit/SourceLine.h')
-rw-r--r--include/cppunit/SourceLine.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cppunit/SourceLine.h b/include/cppunit/SourceLine.h
index 71eeaed..f7a85df 100644
--- a/include/cppunit/SourceLine.h
+++ b/include/cppunit/SourceLine.h
@@ -32,9 +32,14 @@ class CPPUNIT_API SourceLine
public:
SourceLine();
+ // Ensure thread-safe copy by detaching the string buffer.
+ SourceLine( const SourceLine &other );
+
SourceLine( const std::string &fileName,
int lineNumber );
+ SourceLine &operator =( const SourceLine &other );
+
/// Destructor.
virtual ~SourceLine();