diff --git a/include/internal/TestCPPTestCase.h b/include/internal/TestCPPTestCase.h index 2edfe26..d0335b2 100644 --- a/include/internal/TestCPPTestCase.h +++ b/include/internal/TestCPPTestCase.h @@ -296,7 +296,7 @@ namespace TestCPP { * @param failureMessage The error message from the test that * should be logged. */ - void logTestFailure (string failureMessage); + void logTestFailure (const string& failureMessage); /** * @brief Internal test run controller. */ diff --git a/src/TestCPPTestCase.cpp b/src/TestCPPTestCase.cpp index c032288..f013121 100644 --- a/src/TestCPPTestCase.cpp +++ b/src/TestCPPTestCase.cpp @@ -301,7 +301,7 @@ namespace TestCPP { out << TCPPStr::REASON_ << reason << endl; } - void TestCase::logTestFailure (string reason) { + void TestCase::logTestFailure (const string& reason) { unique_ptr logStream = nullptr; if (this->clogOriginal.get() != nullptr) {