From b75536c4a21cdc51cfc1f6a11a8fd1ba15f3b6a8 Mon Sep 17 00:00:00 2001 From: EricLiu2000 Date: Fri, 26 Jul 2019 13:34:03 -0400 Subject: [PATCH] Updated some documentation in eventmanager to reflect chronological pruning of events --- include/icsneo/api/eventmanager.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/icsneo/api/eventmanager.h b/include/icsneo/api/eventmanager.h index c0a2d56..2b94a4d 100644 --- a/include/icsneo/api/eventmanager.h +++ b/include/icsneo/api/eventmanager.h @@ -116,10 +116,11 @@ private: /** * If events is not full, add the event at the end - * Otherwise, remove the least significant events, push the event to the back and push a APIEvent::TooManyEvents to the back (in that order) + * Otherwise, remove the oldest event, push the event to the back and push a APIEvent::TooManyEvents to the back (in that order) */ void add_internal_event(APIEvent event) { // Ensure the event list is at most exactly full (size of eventLimit - 1, leaving room for a potential APIEvent::TooManyEvents) + // Removes any events of type TooManyEvents from the end before checking to avoid duplicates. enforceLimit(); // We are exactly full, either because the list was truncated or because we were simply full before