MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Parse

Method Parse

src/openrct2/object/Object.cpp:117–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 ObjectEntryDescriptor ObjectEntryDescriptor::Parse(std::string_view identifier)
118 {
119 if (identifier.size() == 26 && identifier[8] == '|' && identifier[17] == '|')
120 {
121 RCTObjectEntry entry{};
122 entry.flags = ParseHex(identifier.substr(0, 8));
123 entry.SetName(identifier.substr(9, 8));
124 entry.checksum = ParseHex(identifier.substr(18));
125 return ObjectEntryDescriptor(entry);
126 }
127 return ObjectEntryDescriptor(identifier);
128 }
129
130 bool ObjectEntryDescriptor::operator==(const ObjectEntryDescriptor& rhs) const
131 {

Callers

nothing calls this directly

Calls 4

ParseHexFunction · 0.85
sizeMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected