Don't cast pointers to integers before comparison

This commit is contained in:
Anonymous Maarten 2024-06-25 15:03:53 +02:00
parent 6e47c6b295
commit a1c1dd3b80
3 changed files with 4 additions and 4 deletions

View File

@ -10,14 +10,14 @@
struct LegoPathActorSetCompare {
MxU32 operator()(const LegoPathActor* p_lhs, const LegoPathActor* p_rhs) const
{
return (MxS32) p_lhs < (MxS32) p_rhs;
return (MxS32*) p_lhs < (MxS32*) p_rhs;
}
};
struct LegoAnimPresenterSetCompare {
MxBool operator()(const LegoAnimPresenter* p_lhs, const LegoAnimPresenter* p_rhs) const
{
return (MxS32) p_lhs < (MxS32) p_rhs;
return (MxS32*) p_lhs < (MxS32*) p_rhs;
}
};

View File

@ -21,7 +21,7 @@ struct LegoPathCtrlEdge : public LegoUnknown100db7f4 {};
struct LegoPathCtrlEdgeCompare {
MxU32 operator()(const LegoPathCtrlEdge* p_lhs, const LegoPathCtrlEdge* p_rhs) const
{
return (MxS32) p_lhs < (MxS32) p_rhs;
return (MxS32*) p_lhs < (MxS32*) p_rhs;
}
};

View File

@ -13,7 +13,7 @@ class LegoPathBoundary;
class LegoHideAnimPresenter;
struct CoreSetCompare {
MxS32 operator()(MxCore* const& p_a, MxCore* const& p_b) const { return (MxS32) p_a < (MxS32) p_b; }
MxS32 operator()(MxCore* const& p_a, MxCore* const& p_b) const { return (MxS32*) p_a < (MxS32*) p_b; }
};
typedef set<MxCore*, CoreSetCompare> MxCoreSet;