Changed splitString to splitStringRef

Now takes and returns StringRefs
This commit is contained in:
Phil Nash
2019-04-21 20:03:44 +03:00
parent 02f13cf95a
commit 9d5d719868
5 changed files with 13 additions and 10 deletions

View File

@@ -19,11 +19,11 @@ namespace Catch {
namespace Detail {
std::vector<std::string> parseEnums( StringRef enums ) {
auto enumValues = splitString( enums, ',' );
auto enumValues = splitStringRef( enums, ',' );
std::vector<std::string> parsed;
parsed.reserve( enumValues.size() );
for( auto const& enumValue : enumValues ) {
auto identifiers = splitString( enumValue, ':' );
auto identifiers = splitStringRef( enumValue, ':' );
parsed.push_back( Catch::trim( identifiers.back() ) );
}
return parsed;