MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetStringIndex

Function GetStringIndex

src/strings_func.h:35–38  ·  view source on GitHub ↗

* Extract the StringIndex from a StringID. * @param str String identifier * @return StringIndex from \a str */

Source from the content-addressed store, hash-verified

33 * @return StringIndex from \a str
34 */
35inline StringIndexInTab GetStringIndex(StringID str)
36{
37 return StringIndexInTab{str - (GetStringTab(str) << TAB_SIZE_BITS)};
38}
39
40/**
41 * Create a StringID

Callers 3

GetStringPtrFunction · 0.85
GetStringWithArgsFunction · 0.85
StringToErrorMethod · 0.85

Calls 1

GetStringTabFunction · 0.85

Tested by

no test coverage detected