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

Method __Compare

src/Dynamic.cpp:275–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 }
274
275 int __Compare(const hx::Object *inRHS) const HXCPP_OVERRIDE
276 {
277 if (!inRHS)
278 return 1;
279
280 int diff = __length() - inRHS->__length();
281 if (diff==0)
282 diff = __GetType() - inRHS->__GetType();
283 if (diff==0)
284 diff = memcmp( mValue, inRHS->__GetHandle(), mLength );
285
286 if (diff<0) return -1;
287 if (diff>0) return 1;
288 return 0;
289 }
290
291 int __length() const HXCPP_OVERRIDE { return mLength; }
292

Callers

nothing calls this directly

Calls 6

__lengthFunction · 0.50
__GetTypeFunction · 0.50
memcmpFunction · 0.50
__lengthMethod · 0.45
__GetTypeMethod · 0.45
__GetHandleMethod · 0.45

Tested by

no test coverage detected