From 0bef191acd5a77544852e6a3daae2df05bd34a31 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Wed, 19 Jan 2022 11:20:45 +0000 Subject: [PATCH] Reformat and change send to x-www-form-urlencoded --- book.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/book.cpp b/book.cpp index 1ee1d06..5a3fb9d 100644 --- a/book.cpp +++ b/book.cpp @@ -71,7 +71,7 @@ std::ostream& operator<<(std::ostream& out, const Level& a) { return out << "Price: " << a.price << ", volume: " << a.volume - << ", time: " << a.timestamp << ", id: " << a.id; + << ", time: " << a.timestamp << ", id: " << a.id; } Book::Book() @@ -92,22 +92,22 @@ void Book::ask(Order& order) { - Level a(order); - auto b = std::lower_bound(this->askSide.begin(), this->askSide.end(), a); - this->askSide.insert(b, a); + Level a(order); + auto b = std::lower_bound(this->askSide.begin(), this->askSide.end(), a); + this->askSide.insert(b, a); } void Book::bid(Order& order) { - Level a(order); - auto b = std::upper_bound(this->bidSide.begin(), this->bidSide.end(), a); - this->bidSide.insert(b, a); + Level a(order); + auto b = std::upper_bound(this->bidSide.begin(), this->bidSide.end(), a); + this->bidSide.insert(b, a); } void Book::printBook(std::size_t numOrders) { std::cout << "Sell side: " << this->askSide.size() << std::endl; - std::size_t count = 0; + std::size_t count = 0; for (auto i = this->askSide.rbegin(); i != this->askSide.rend(); i++) { std::cout << *i << std::endl; count++; -- Gitblit v1.9.3