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

Function decodePrefixedString

src/jsoncpp.cpp:2561–2572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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