forked from catchorg/Catch2
Use StringRef in pluralise implementation
This means that it can no longer be safely made ahead of time, but nothing in our existing code used it like that. Normally it is constructed and used in the same expression, which is now more efficient.
This commit is contained in:
@@ -94,11 +94,6 @@ namespace Catch {
|
||||
return subStrings;
|
||||
}
|
||||
|
||||
pluralise::pluralise( std::size_t count, std::string const& label )
|
||||
: m_count( count ),
|
||||
m_label( label )
|
||||
{}
|
||||
|
||||
std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) {
|
||||
os << pluraliser.m_count << ' ' << pluraliser.m_label;
|
||||
if( pluraliser.m_count != 1 )
|
||||
|
||||
Reference in New Issue
Block a user