MCPcopy Create free account
hub / github.com/RenderKit/oidn / extractInstanceName

Function extractInstanceName

external/catch.hpp:10583–10590  ·  view source on GitHub ↗

Extracts the actual name part of an enum instance In other words, it returns the Blue part of Bikeshed::Colour::Blue

Source from the content-addressed store, hash-verified

10581 // Extracts the actual name part of an enum instance
10582 // In other words, it returns the Blue part of Bikeshed::Colour::Blue
10583 StringRef extractInstanceName(StringRef enumInstance) {
10584 // Find last occurrence of ":"
10585 size_t name_start = enumInstance.size();
10586 while (name_start > 0 && enumInstance[name_start - 1] != ':') {
10587 --name_start;
10588 }
10589 return enumInstance.substr(name_start, enumInstance.size() - name_start);
10590 }
10591 }
10592
10593 std::vector<StringRef> parseEnums( StringRef enums ) {

Callers 1

parseEnumsFunction · 0.85

Calls 2

sizeMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected