From 13798a3669db5d537f4519c5d25b6d9df08637a9 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 11 Jun 2021 16:06:12 -0500 Subject: [PATCH] Update compareByTime function --- .../Topic 4/4.4.11/OrderBookEntry.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h b/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h index 55462c3..cdfc0bc 100644 --- a/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h +++ b/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h @@ -15,6 +15,10 @@ class OrderBookEntry OrderBookType _orderType); static OrderBookType stringToOrderBookType(std::string s); + static bool compareByTimestamp(OrderBookEntry& entry1, OrderBookEntry& entry2) + { + return entry1.timestamp < entry2.timestamp; + } double price; double amount;