mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 05:59:24 +00:00
Fixed string indexing bug
This commit is contained in:
parent
04a3364b5a
commit
f7378eebb6
6 changed files with 17 additions and 9 deletions
|
@ -111,7 +111,7 @@ namespace Catch {
|
|||
|
||||
inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
|
||||
std::string className = classOrQualifiedMethodName;
|
||||
if( className[0] == '&' )
|
||||
if( startsWith( className, "&" ) )
|
||||
{
|
||||
std::size_t lastColons = className.rfind( "::" );
|
||||
std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue