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

Function ParseType

src/console_cmds.cpp:85–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 */
84template <typename T>
85static std::optional<T> ParseType(std::string_view arg)
86{
87 auto i = ParseInteger(arg);
88 if (i.has_value()) return static_cast<T>(*i);
89 return std::nullopt;
90}
91
92/** File list storage for the console, for caching the last 'ls' command. */
93class ConsoleFileList : public FileList {

Callers

nothing calls this directly

Calls 1

ParseIntegerFunction · 0.85

Tested by

no test coverage detected