MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / isPtrZero

Function isPtrZero

src/ast/ast_match.cpp:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 bool isPtrZero ( ExpressionPtr expr ) {
31 if ( !expr->rtti_isConstant() ) return false;
32 auto ce = static_cast<ExprConst*>(expr);
33 switch ( ce->baseType ) {
34 case Type::tPointer:
35 return cast<void *>::to(ce->value) == nullptr;
36 default: return false;
37 }
38 }
39 bool isFloatConst ( ExpressionPtr expr, float value ) {
40 if ( !expr->rtti_isConstant() ) return false;
41 auto ce = static_cast<ExprConst*>(expr);

Callers 1

isZeroConstFunction · 0.85

Calls 1

toFunction · 0.85

Tested by

no test coverage detected