Use StringRef on fatal error path

So far the fatal error path only uses string literals, so this removes
an allocation from that context
This commit is contained in:
Martin Hořeňovský
2017-09-14 20:05:25 +02:00
parent 4e85267203
commit 40209d1ae0
3 changed files with 5 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ namespace Catch {
m_shouldReportUnexpected = false;
}
void RunContext::handleFatalErrorCondition(std::string const & message) {
void RunContext::handleFatalErrorCondition( StringRef message ) {
// First notify reporter that bad things happened
m_reporter->fatalErrorEncountered(message);