MCPcopy Create free account
hub / github.com/ValveSoftware/Proton / decodePrefixedString

Function decodePrefixedString

vrclient_x64/jsoncpp.cpp:2560–2571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2558 return newString;
2559}
2560inline static void decodePrefixedString(
2561 bool isPrefixed, char const* prefixed,
2562 unsigned* length, char const** value)
2563{
2564 if (!isPrefixed) {
2565 *length = static_cast<unsigned>(strlen(prefixed));
2566 *value = prefixed;
2567 } else {
2568 *length = *reinterpret_cast<unsigned const*>(prefixed);
2569 *value = prefixed + sizeof(unsigned);
2570 }
2571}
2572/** Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue().
2573 */
2574static inline void releaseStringValue(char* value) { free(value); }

Callers 7

ValueMethod · 0.85
operator<Method · 0.85
operator==Method · 0.85
asCStringMethod · 0.85
getStringMethod · 0.85
asStringMethod · 0.85
asConstStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected