From 1cd66bfd883a18577a4b8d5d246b4aff21e000f6 Mon Sep 17 00:00:00 2001 From: "Cheng Ho Ming, Eric" Date: Wed, 5 Jun 2024 22:23:57 +0800 Subject: [PATCH] Todo cleanup (#125) --- include/events.h | 1 - src/stock.cpp | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/events.h b/include/events.h index 79b46954..d2d13127 100644 --- a/include/events.h +++ b/include/events.h @@ -232,7 +232,6 @@ void print_map(const std::map> & map); extern const Stock_event STOCK_SPLIT_EVENT; -/// @todo Understand this constexpr lambda inline const unsigned int sumOfAllEventsProbability = []() { unsigned int sum = 0; for (const auto & event : all_stock_events) { diff --git a/src/stock.cpp b/src/stock.cpp index dcd4f9f0..c6a64288 100644 --- a/src/stock.cpp +++ b/src/stock.cpp @@ -64,9 +64,7 @@ void Stock::load(const std::string & playerName, int i) { // get the first line, which is category fin >> *this; // use operator>> to load the Stock object fin.close(); - // @todo Do not hardcode this limit, use a constant - // STOCK_PRICE_LIMIT instead - assert(price <= 1000 && "Price exceed the limit"); + assert(price <= STOCK_PRICE_LIMIT && "Price exceed the limit"); std::cout << "done" << std::endl; }