aboutsummaryrefslogtreecommitdiff
path: root/common/lru.h
diff options
context:
space:
mode:
authorMartin Brabham <optedoblivion@google.com>2020-09-08 13:02:48 -0700
committerMartin Brabham <optedoblivion@google.com>2020-09-08 15:53:04 -0700
commit24460cffcf9aed815dbb0cba5c357e7943f0bedd (patch)
treee9cb07b58b2a86136a6b6a7d6b8f76a09aed3f31 /common/lru.h
parent8db8f6a4ed9724b7811bdf3cd07536745b5cb968 (diff)
downloadbt-24460cffcf9aed815dbb0cba5c357e7943f0bedd.tar.gz
Rename LruCache -> LegacyLruCache
There is a naming conflict with common/lru.h and gd/common/lru_cache.h. In order to make the metrics calls from the shim on the actual events the legacy version has been renamed to reflect. Bug: 162984360 Tag: #gd-refactor Test: cert/run --host SecurityTest Test: atest --host bluetooth_test_gd Test: Manual testing with hybrid stack Change-Id: I4e8656915359fb29b57dcd8405ee295d8ab2a536
Diffstat (limited to 'common/lru.h')
-rw-r--r--common/lru.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/lru.h b/common/lru.h
index 36f8707dc..42636832d 100644
--- a/common/lru.h
+++ b/common/lru.h
@@ -33,7 +33,7 @@ namespace bluetooth {
namespace common {
template <typename K, typename V>
-class LruCache {
+class LegacyLruCache {
public:
using Node = std::pair<K, V>;
/**
@@ -42,7 +42,7 @@ class LruCache {
* @param capacity maximum size of the cache
* @param log_tag, keyword to put at the head of log.
*/
- LruCache(const size_t& capacity, const std::string& log_tag)
+ LegacyLruCache(const size_t& capacity, const std::string& log_tag)
: capacity_(capacity) {
if (capacity_ == 0) {
// don't allow invalid capacity
@@ -51,10 +51,10 @@ class LruCache {
}
// delete copy constructor
- LruCache(LruCache const&) = delete;
- LruCache& operator=(LruCache const&) = delete;
+ LegacyLruCache(LegacyLruCache const&) = delete;
+ LegacyLruCache& operator=(LegacyLruCache const&) = delete;
- ~LruCache() { Clear(); }
+ ~LegacyLruCache() { Clear(); }
/**
* Clear the cache