From df5aecd102a9b6e454bdf9a4fa713449af2b9b5c Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 5 Dec 2021 16:24:11 -0500 Subject: [PATCH] refactor: Replace refs to google/btree w/ Kronuz/btree The former has been replaced with the latter in externals --- src/lib/md/MBOProcessor.cpp | 4 ++-- src/lib/md/MBOProcessor.h | 6 +++--- src/lib/md/MDConsumer.cpp | 8 ++++---- src/lib/md/SecurityCache.cpp | 10 +++++----- src/lib/md/SecurityMapper.cpp | 6 +++--- src/lib/md/SecurityStore.cpp | 6 +++--- src/lib/orderman/ilink3/IL3Parser.h | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/lib/md/MBOProcessor.cpp b/src/lib/md/MBOProcessor.cpp index d6f625099..6797ce573 100644 --- a/src/lib/md/MBOProcessor.cpp +++ b/src/lib/md/MBOProcessor.cpp @@ -12,7 +12,7 @@ #include #ifndef _WIN32 -#include +#include #endif #include #include @@ -126,7 +126,7 @@ struct MBOProcessorImpl { // after draining publish the set in small batches // re-check input queue regularly - btree::btree_set dirty; + btree::set dirty; std::vector clean; while (running) { diff --git a/src/lib/md/MBOProcessor.h b/src/lib/md/MBOProcessor.h index c917bdeca..093abf4cf 100644 --- a/src/lib/md/MBOProcessor.h +++ b/src/lib/md/MBOProcessor.h @@ -6,7 +6,7 @@ #include "lib/domain_model/SecurityKey.h" #include "lib/utils/TimeStamp.h" -#include "google/btree/btree_map.h" +#include #include #include @@ -102,8 +102,8 @@ struct MBOWorkingState { // Used for 'change' messages which update price std::unordered_map orderid_index; - btree::btree_map bid; - btree::btree_map ask; + btree::map bid; + btree::map ask; }; void copy_to_snapshot(MBOWorkingState &state, MBOSnapshot *destination); diff --git a/src/lib/md/MDConsumer.cpp b/src/lib/md/MDConsumer.cpp index b51216ea9..8fecab540 100644 --- a/src/lib/md/MDConsumer.cpp +++ b/src/lib/md/MDConsumer.cpp @@ -13,7 +13,7 @@ #include "lib/utils/sane_algorithm.h" #include -#include +#include #include #include #include @@ -22,7 +22,7 @@ using namespace std; using namespace bts::api; -using namespace btree; +// using namespace btree; namespace bts { namespace md { @@ -173,9 +173,9 @@ class MDConsumerInst { return false; } - btree_map> + btree::map> search_handles(const std::set &keys) { - btree_map> result; + btree::map> result; // Walk hot and cold lists and fill in any found handles if (!_cold.is_initialized()) return result; diff --git a/src/lib/md/SecurityCache.cpp b/src/lib/md/SecurityCache.cpp index 60971d7ea..a3dc0485f 100644 --- a/src/lib/md/SecurityCache.cpp +++ b/src/lib/md/SecurityCache.cpp @@ -3,7 +3,7 @@ #include "lib/utils/Dispatcher.h" #include "lib/utils/LockBox.h" -#include +#include #include #include #include @@ -12,8 +12,8 @@ namespace bts { namespace md { struct SecurityCacheImpl { - utils::LockBox> cache; - utils::LockBox> ex_cache; + utils::LockBox> cache; + utils::LockBox> ex_cache; tbb::concurrent_queue update_queue; void enqueue_update_db(const SecurityPtr &); void flush(); @@ -48,7 +48,7 @@ SecurityCache::SecurityCache() : _me(std::make_shared()) {} SecurityCache::~SecurityCache() {} const Security *SecurityCache::try_get_security(SecurityKey key) const { - return _me->cache.lock([key](btree::btree_map &t) { + return _me->cache.lock([key](btree::map &t) { auto iter = t.find(key); if (iter != t.end()) { return iter->second.get(); @@ -58,7 +58,7 @@ const Security *SecurityCache::try_get_security(SecurityKey key) const { } const Security *SecurityCache::try_get_security(ExchangeSecurityKey key) const { return _me->ex_cache.lock( - [key](btree::btree_map &t) { + [key](btree::map &t) { auto iter = t.find(key); if (iter != t.end()) { return iter->second.get(); diff --git a/src/lib/md/SecurityMapper.cpp b/src/lib/md/SecurityMapper.cpp index 856818f6c..2c69f44b5 100644 --- a/src/lib/md/SecurityMapper.cpp +++ b/src/lib/md/SecurityMapper.cpp @@ -8,12 +8,12 @@ #include "lib/domain_model/Security.h" #include "lib/utils/parse_enum.h" #ifndef _WIN32 -#include "google/btree/btree_map.h" +#include namespace bts { namespace md { struct DisplayFactorMapper : public ISecurityMapper { - btree::btree_map _mapped; + btree::map _mapped; DisplayFactorMapper() : _mapped() { for (const auto &ov : config::get().override()) { if (ov.has_price_multiplier()) { @@ -51,7 +51,7 @@ struct DisplayFactorMapper : public ISecurityMapper { }; struct CppOverride : public ISecurityMapper { - btree::btree_map _map; + btree::map _map; CppOverride() : _map() { for (const auto &p : config::get().cpp_entry()) { _map.insert(p); diff --git a/src/lib/md/SecurityStore.cpp b/src/lib/md/SecurityStore.cpp index bf176c0b1..950e47305 100644 --- a/src/lib/md/SecurityStore.cpp +++ b/src/lib/md/SecurityStore.cpp @@ -4,7 +4,7 @@ #include "lib/utils/Dispatcher.h" #include "lib/utils/LockBox.h" -#include +#include #include #include #include @@ -19,7 +19,7 @@ static domain::SecurityID create_sec_id( } struct SecurityStore::PImpl { - utils::LockBox> cache; + utils::LockBox> cache; tbb::concurrent_queue update_queue; void enqueue_update_db(const SecurityPtr &); @@ -47,7 +47,7 @@ SecurityStore::~SecurityStore() {} const domain::Security *SecurityStore::try_get_security( domain::SecurityID key) const { return me_->cache.lock( - [key](btree::btree_map &t) + [key](btree::map &t) -> const domain::Security * { auto iter = t.find(key); if (iter != t.end()) { diff --git a/src/lib/orderman/ilink3/IL3Parser.h b/src/lib/orderman/ilink3/IL3Parser.h index 71a5db907..cd5b8fb5f 100644 --- a/src/lib/orderman/ilink3/IL3Parser.h +++ b/src/lib/orderman/ilink3/IL3Parser.h @@ -5,7 +5,7 @@ #include "lib/md/SecurityOracle.h" #include "lib/orderman/orderman_utils/ExecutionReport.h" #include -#include +#include namespace bts { namespace orderman {