mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 19:25:38 +02:00
Use char literal instead of string literal with 1 char
In reality, this is a relatively small performance improvement, especially with the previous improvements removing lots of superfluous string handling, but still was measurable.
This commit is contained in:
@@ -69,7 +69,7 @@ std::string toString( std::string const& value ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return "\"" + s + "\"";
|
||||
return '"' + s + '"';
|
||||
}
|
||||
std::string toString( std::wstring const& value ) {
|
||||
|
||||
@@ -138,7 +138,7 @@ std::string toString( const double value ) {
|
||||
return fpToString( value, 10 );
|
||||
}
|
||||
std::string toString( const float value ) {
|
||||
return fpToString( value, 5 ) + "f";
|
||||
return fpToString( value, 5 ) + 'f';
|
||||
}
|
||||
|
||||
std::string toString( bool value ) {
|
||||
|
Reference in New Issue
Block a user