refactor: Replace refs to google/btree w/ Kronuz/btree

The former has been replaced with the latter in externals
This commit is contained in:
John Colvin committed 2021-12-05 16:24:34 -05:00
1 parent 75c0fee5bf
commit df5aecd102
7 files changed
+21 -21

No files matched your search

+5 -5
View File
@@ -3,7 +3,7 @@
#include "lib/utils/Dispatcher.h"
#include "lib/utils/LockBox.h"
#include <google/btree/btree_map.h>
#include <btree/map.h>
#include <mutex>
#include <tbb/concurrent_queue.h>
#include <unordered_map>
@@ -12,8 +12,8 @@ namespace bts {
namespace md {
struct SecurityCacheImpl {
utils::LockBox<btree::btree_map<SecurityKey, SecurityPtr>> cache;
utils::LockBox<btree::btree_map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
utils::LockBox<btree::map<SecurityKey, SecurityPtr>> cache;
utils::LockBox<btree::map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
tbb::concurrent_queue<SecurityPtr> update_queue;
void enqueue_update_db(const SecurityPtr &);
void flush();
@@ -48,7 +48,7 @@ SecurityCache::SecurityCache() : _me(std::make_shared<SecurityCacheImpl>()) {}
SecurityCache::~SecurityCache() {}
const Security *SecurityCache::try_get_security(SecurityKey key) const {
return _me->cache.lock([key](btree::btree_map<SecurityKey, SecurityPtr> &t) {
return _me->cache.lock([key](btree::map<SecurityKey, SecurityPtr> &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<ExchangeSecurityKey, SecurityPtr> &t) {
[key](btree::map<ExchangeSecurityKey, SecurityPtr> &t) {
auto iter = t.find(key);
if (iter != t.end()) {
return iter->second.get();