MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / operator==

Method operator==

include/cpp/Variant.h:477–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475
476 template<typename T>
477 bool Variant::operator==(const T &inRHS) const
478 {
479 switch(type)
480 {
481 case typeInt: return valInt==(double)inRHS;
482 case typeDouble:return valDouble==(double)inRHS;
483 case typeBool: return valBool==(bool)inRHS;
484 case typeInt64: return valInt64==(cpp::Int64)inRHS;
485 case typeString: return getString()==String(inRHS);
486 case typeObject:
487 if (!valObject)
488 return inRHS == null();
489 return valObject->__Compare( Dynamic(inRHS).mPtr )==0;
490 }
491 return false;
492 }
493
494
495 int Variant::Compare(hx::Object *inPtr) const

Callers

nothing calls this directly

Calls 5

CompareMethod · 0.80
StringClass · 0.50
nullClass · 0.50
DynamicClass · 0.50
__CompareMethod · 0.45

Tested by

no test coverage detected