MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / operator==

Method operator==

include/reactphysics3d/containers/Map.h:589–608  ·  view source on GitHub ↗

Overloaded equality operator

Source from the content-addressed store, hash-verified

587
588 /// Overloaded equality operator
589 bool operator==(const Map<K,V>& map) const {
590
591 if (size() != map.size()) return false;
592
593 for (auto it = begin(); it != end(); ++it) {
594 auto it2 = map.find(it->first);
595 if (it2 == map.end() || it2->second != it->second) {
596 return false;
597 }
598 }
599
600 for (auto it = map.begin(); it != map.end(); ++it) {
601 auto it2 = find(it->first);
602 if (it2 == end() || it2->second != it->second) {
603 return false;
604 }
605 }
606
607 return true;
608 }
609
610 /// Overloaded not equal operator
611 bool operator!=(const Map<K,V>& map) const {

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected