mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Fixed leak
This commit is contained in:
@@ -66,8 +66,7 @@ public:
|
||||
m_expressionIncomplete = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
friend class ResultBuilder;
|
||||
void setLhs( const std::string& lhs )
|
||||
|
@@ -48,9 +48,8 @@ namespace Catch
|
||||
|
||||
TestCaseInfo& operator = ( const TestCaseInfo& other )
|
||||
{
|
||||
test = other.test->clone();
|
||||
name = other.name;
|
||||
description = description;
|
||||
TestCaseInfo temp( other );
|
||||
swap( temp );
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -73,6 +72,13 @@ namespace Catch
|
||||
return description;
|
||||
}
|
||||
|
||||
void swap( TestCaseInfo& other )
|
||||
{
|
||||
std::swap( test, other.test );
|
||||
name.swap( other.name );
|
||||
description.swap( other.description );
|
||||
}
|
||||
|
||||
private:
|
||||
TestCase* test;
|
||||
std::string name;
|
||||
|
Reference in New Issue
Block a user