MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / default_if_null

Function default_if_null

lib/utils.h:415–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413
414template<typename T>
415static inline T* default_if_null(T* p, T* def)
416{
417 return p ? p : def;
418}
419
420template<typename T>
421static inline T* empty_if_null(T* p)

Callers 3

analyseWholeProgramMethod · 0.85
empty_if_nullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected