From e225b7f8262df48ad4d7094bc295add3007b0649 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 11 Sep 2017 22:20:49 +0100 Subject: Replace ItemCallbacks with lambdas (#3993) --- .../TripwireHookHandler.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h') diff --git a/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h index 609db932d..47225715f 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h @@ -39,26 +39,7 @@ public: if (Type == E_BLOCK_TRIPWIRE) { - class cTripwireCallback : - public cEntityCallback - { - public: - cTripwireCallback(void) : - m_NumberOfEntities(0), - m_FoundPlayer(false) - { - } - - virtual bool Item(cEntity * a_Entity) override - { - return true; - } - - unsigned int m_NumberOfEntities; - bool m_FoundPlayer; - } TripwireCallback; - - if (!a_World.ForEachEntityInBox(cBoundingBox(Vector3d(0.5, 0, 0.5) + Position, 0.5, 0.5), TripwireCallback)) + if (!a_World.ForEachEntityInBox(cBoundingBox(Vector3d(0.5, 0, 0.5) + Position, 0.5, 0.5), [](cEntity &) { return true; })) { FoundActivated = true; } -- cgit v1.2.3