MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / link

Method link

src/hx/cppia/Cppia.cpp:7699–7718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7697 const char *getName() HXCPP_OVERRIDE { return "OpCompare"; }
7698
7699 CppiaExpr *link(CppiaModule &inModule) HXCPP_OVERRIDE
7700 {
7701 left = left->link(inModule);
7702 right = right->link(inModule);
7703 ExprType t1 = left->getType();
7704 ExprType t2 = right->getType();
7705
7706 if (isNumeric(t1) && isNumeric(t2))
7707 {
7708 compareType = t1==etInt && t2==etInt ? compInt : compFloat;
7709 }
7710 else if (t1==etString || t2==etString)
7711 {
7712 compareType = compString;
7713 }
7714 else
7715 compareType = compDynamic;
7716
7717 return this;
7718 }
7719
7720 hx::Object *runObject(CppiaCtx *ctx) HXCPP_OVERRIDE
7721 {

Callers

nothing calls this directly

Calls 3

isNumericFunction · 0.85
linkMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected