From 707400b4c6de94a22075b17d8d4ef08fa75813d9 Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Fri, 19 Nov 2004 19:00:44 +0000 Subject: 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). --- include/cppunit/SourceLine.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/cppunit/SourceLine.h') 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(); -- cgit v1.2.1