MCPcopy Create free account
hub / github.com/DFHack/dfhack / safe_str

Function safe_str

library/Error.cpp:9–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace DFHack::Error;
8
9inline std::string safe_str(const char *s)
10{
11 return s ? s : "(NULL)";
12}
13
14NullPointer::NullPointer(const char *varname, const char *func)
15 :All("In " + safe_str(func) + ": NULL pointer: " + safe_str(varname)),

Callers 6

NullPointerMethod · 0.85
InvalidArgumentMethod · 0.85
VTableMissingMethod · 0.85
SymbolsXmlParseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected