Coverage Report

Created: 2025-08-29 07:11

/src/PROJ/include/proj/internal/lru_cache.hpp
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * LRUCache11 - a templated C++11 based LRU cache class that allows
3
 * specification of
4
 * key, value and optionally the map container type (defaults to
5
 * std::unordered_map)
6
 * By using the std::map and a linked list of keys it allows O(1) insert, delete
7
 * and
8
 * refresh operations.
9
 *
10
 * This is a header-only library and all you need is the LRUCache11.hpp file
11
 *
12
 * Github: https://github.com/mohaps/lrucache11
13
 *
14
 * This is a follow-up to the LRUCache project -
15
 * https://github.com/mohaps/lrucache
16
 *
17
 * Copyright (c) 2012-22 SAURAV MOHAPATRA <mohaps@gmail.com>
18
 *
19
 * Permission to use, copy, modify, and distribute this software for any
20
 * purpose with or without fee is hereby granted, provided that the above
21
 * copyright notice and this permission notice appear in all copies.
22
 *
23
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
24
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
25
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
26
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
27
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
28
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
29
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
30
 */
31
32
/*! @cond Doxygen_Suppress */
33
34
#pragma once
35
#include <algorithm>
36
#include <cstdint>
37
#include <list>
38
#include <mutex>
39
#include <stdexcept>
40
#include <thread>
41
#include <unordered_map>
42
43
NS_PROJ_START
44
namespace lru11 {
45
/*
46
 * a noop lockable concept that can be used in place of std::mutex
47
 */
48
class NullLock {
49
  public:
50
    // cppcheck-suppress functionStatic
51
2.05M
    void lock() {}
52
    // cppcheck-suppress functionStatic
53
2.05M
    void unlock() {}
54
    // cppcheck-suppress functionStatic
55
0
    bool try_lock() { return true; }
56
};
57
58
/**
59
 * error raised when a key not in cache is passed to get()
60
 */
61
class KeyNotFound : public std::invalid_argument {
62
  public:
63
0
    KeyNotFound() : std::invalid_argument("key_not_found") {}
64
    ~KeyNotFound() override;
65
};
66
67
#ifndef LRU11_DO_NOT_DEFINE_OUT_OF_CLASS_METHODS
68
0
KeyNotFound::~KeyNotFound() = default;
69
#endif
70
71
template <typename K, typename V> struct KeyValuePair {
72
  public:
73
    K key;
74
    V value;
75
76
179k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
Unexecuted instantiation: osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >::KeyValuePair(osgeo::proj::NetworkChunkCache::Key const&, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > const&)
Unexecuted instantiation: osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::FileProperties const&)
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> const&)
Line
Count
Source
76
8.61k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::util::BaseObject> const&)
Line
Count
Source
76
104k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > const&)
Line
Count
Source
76
34.8k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::io::DatabaseContext::Private::GridInfoCache const&)
Line
Count
Source
76
26.8k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
Line
Count
Source
76
2.32k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::KeyValuePair(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
76
2.13k
    KeyValuePair(const K &keyIn, const V &v) : key(keyIn), value(v) {}
Unexecuted instantiation: osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >::KeyValuePair(unsigned long const&, std::__1::vector<float, std::__1::allocator<float> > const&)
Unexecuted instantiation: osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >::KeyValuePair(unsigned long const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&)
77
};
78
79
/**
80
 *  The LRU Cache class templated by
81
 *    Key - key type
82
 *    Value - value type
83
 *    MapType - an associative container like std::unordered_map
84
 *    LockType - a lock type derived from the Lock class (default:
85
 *NullLock = no synchronization)
86
 *
87
 *  The default NullLock based template is not thread-safe, however passing
88
 *Lock=std::mutex will make it
89
 *  thread-safe
90
 */
91
template <class Key, class Value, class Lock = NullLock,
92
          class Map = std::unordered_map<
93
              Key, typename std::list<KeyValuePair<Key, Value>>::iterator>>
94
class Cache {
95
  public:
96
    typedef KeyValuePair<Key, Value> node_type;
97
    typedef std::list<KeyValuePair<Key, Value>> list_type;
98
    typedef Map map_type;
99
    typedef Lock lock_type;
100
    using Guard = std::lock_guard<lock_type>;
101
    /**
102
     * the max size is the hard limit of keys and (maxSize + elasticity) is the
103
     * soft limit
104
     * the cache is allowed to grow till maxSize + elasticity and is pruned back
105
     * to maxSize keys
106
     * set maxSize = 0 for an unbounded cache (but in that case, you're better
107
     * off using a std::unordered_map directly anyway! :)
108
     */
109
    explicit Cache(size_t maxSize = 64, size_t elasticity = 10)
110
103k
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
2
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
2
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
1
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
68.9k
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
8.61k
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
8.61k
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
8.61k
        : maxSize_(maxSize), elasticity_(elasticity) {}
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::Cache(unsigned long, unsigned long)
Line
Count
Source
110
8.61k
        : maxSize_(maxSize), elasticity_(elasticity) {}
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*> > > > >::Cache(unsigned long, unsigned long)
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<float, std::__1::allocator<float> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*> > > > >::Cache(unsigned long, unsigned long)
111
103k
    virtual ~Cache() = default;
Unexecuted instantiation: osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::~Cache()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::~Cache()
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::~Cache()
Line
Count
Source
111
1
    virtual ~Cache() = default;
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::~Cache()
Line
Count
Source
111
8.61k
    virtual ~Cache() = default;
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::~Cache()
Line
Count
Source
111
8.61k
    virtual ~Cache() = default;
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::~Cache()
Line
Count
Source
111
8.61k
    virtual ~Cache() = default;
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::~Cache()
Line
Count
Source
111
68.9k
    virtual ~Cache() = default;
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::~Cache()
Line
Count
Source
111
8.61k
    virtual ~Cache() = default;
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*> > > > >::~Cache()
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<float, std::__1::allocator<float> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*> > > > >::~Cache()
112
    size_t size() const {
113
        Guard g(lock_);
114
        return cache_.size();
115
    }
116
    bool empty() const {
117
        Guard g(lock_);
118
        return cache_.empty();
119
    }
120
29.4k
    void clear() {
121
29.4k
        Guard g(lock_);
122
29.4k
        cache_.clear();
123
29.4k
        keys_.clear();
124
29.4k
    }
osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::clear()
Line
Count
Source
120
9.80k
    void clear() {
121
9.80k
        Guard g(lock_);
122
9.80k
        cache_.clear();
123
9.80k
        keys_.clear();
124
9.80k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::clear()
Line
Count
Source
120
9.80k
    void clear() {
121
9.80k
        Guard g(lock_);
122
9.80k
        cache_.clear();
123
9.80k
        keys_.clear();
124
9.80k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::clear()
Line
Count
Source
120
9.80k
    void clear() {
121
9.80k
        Guard g(lock_);
122
9.80k
        cache_.clear();
123
9.80k
        keys_.clear();
124
9.80k
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::clear()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::clear()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::clear()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::clear()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::clear()
125
179k
    void insert(const Key &key, const Value &v) {
126
179k
        Guard g(lock_);
127
179k
        const auto iter = cache_.find(key);
128
179k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
179k
        keys_.emplace_front(key, v);
135
179k
        cache_[key] = keys_.begin();
136
179k
        prune();
137
179k
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::insert(osgeo::proj::NetworkChunkCache::Key const&, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > const&)
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::FileProperties const&)
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> const&)
Line
Count
Source
125
8.61k
    void insert(const Key &key, const Value &v) {
126
8.61k
        Guard g(lock_);
127
8.61k
        const auto iter = cache_.find(key);
128
8.61k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
8.61k
        keys_.emplace_front(key, v);
135
8.61k
        cache_[key] = keys_.begin();
136
8.61k
        prune();
137
8.61k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::util::BaseObject> const&)
Line
Count
Source
125
104k
    void insert(const Key &key, const Value &v) {
126
104k
        Guard g(lock_);
127
104k
        const auto iter = cache_.find(key);
128
104k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
104k
        keys_.emplace_front(key, v);
135
104k
        cache_[key] = keys_.begin();
136
104k
        prune();
137
104k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > const&)
Line
Count
Source
125
34.8k
    void insert(const Key &key, const Value &v) {
126
34.8k
        Guard g(lock_);
127
34.8k
        const auto iter = cache_.find(key);
128
34.8k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
34.8k
        keys_.emplace_front(key, v);
135
34.8k
        cache_[key] = keys_.begin();
136
34.8k
        prune();
137
34.8k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::io::DatabaseContext::Private::GridInfoCache const&)
Line
Count
Source
125
26.8k
    void insert(const Key &key, const Value &v) {
126
26.8k
        Guard g(lock_);
127
26.8k
        const auto iter = cache_.find(key);
128
26.8k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
26.8k
        keys_.emplace_front(key, v);
135
26.8k
        cache_[key] = keys_.begin();
136
26.8k
        prune();
137
26.8k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&)
Line
Count
Source
125
2.32k
    void insert(const Key &key, const Value &v) {
126
2.32k
        Guard g(lock_);
127
2.32k
        const auto iter = cache_.find(key);
128
2.32k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
2.32k
        keys_.emplace_front(key, v);
135
2.32k
        cache_[key] = keys_.begin();
136
2.32k
        prune();
137
2.32k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::insert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Line
Count
Source
125
2.13k
    void insert(const Key &key, const Value &v) {
126
2.13k
        Guard g(lock_);
127
2.13k
        const auto iter = cache_.find(key);
128
2.13k
        if (iter != cache_.end()) {
129
0
            iter->second->value = v;
130
0
            keys_.splice(keys_.begin(), keys_, iter->second);
131
0
            return;
132
0
        }
133
134
2.13k
        keys_.emplace_front(key, v);
135
2.13k
        cache_[key] = keys_.begin();
136
2.13k
        prune();
137
2.13k
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<float, std::__1::allocator<float> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*> > > > >::insert(unsigned long const&, std::__1::vector<float, std::__1::allocator<float> > const&)
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*> > > > >::insert(unsigned long const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&)
138
1.86M
    bool tryGet(const Key &kIn, Value &vOut) {
139
1.86M
        Guard g(lock_);
140
1.86M
        const auto iter = cache_.find(kIn);
141
1.86M
        if (iter == cache_.end()) {
142
221k
            return false;
143
221k
        }
144
1.64M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.64M
        vOut = iter->second->value;
146
1.64M
        return true;
147
1.86M
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::tryGet(osgeo::proj::NetworkChunkCache::Key const&, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >&)
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::FileProperties&)
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>&)
Line
Count
Source
138
8.61k
    bool tryGet(const Key &kIn, Value &vOut) {
139
8.61k
        Guard g(lock_);
140
8.61k
        const auto iter = cache_.find(kIn);
141
8.61k
        if (iter == cache_.end()) {
142
8.61k
            return false;
143
8.61k
        }
144
1
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1
        vOut = iter->second->value;
146
1
        return true;
147
8.61k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<osgeo::proj::util::BaseObject>&)
Line
Count
Source
138
1.46M
    bool tryGet(const Key &kIn, Value &vOut) {
139
1.46M
        Guard g(lock_);
140
1.46M
        const auto iter = cache_.find(kIn);
141
1.46M
        if (iter == cache_.end()) {
142
147k
            return false;
143
147k
        }
144
1.31M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.31M
        vOut = iter->second->value;
146
1.31M
        return true;
147
1.46M
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >&)
Line
Count
Source
138
135k
    bool tryGet(const Key &kIn, Value &vOut) {
139
135k
        Guard g(lock_);
140
135k
        const auto iter = cache_.find(kIn);
141
135k
        if (iter == cache_.end()) {
142
34.8k
            return false;
143
34.8k
        }
144
100k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
100k
        vOut = iter->second->value;
146
100k
        return true;
147
135k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, osgeo::proj::io::DatabaseContext::Private::GridInfoCache&)
Line
Count
Source
138
123k
    bool tryGet(const Key &kIn, Value &vOut) {
139
123k
        Guard g(lock_);
140
123k
        const auto iter = cache_.find(kIn);
141
123k
        if (iter == cache_.end()) {
142
26.8k
            return false;
143
26.8k
        }
144
97.0k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
97.0k
        vOut = iter->second->value;
146
97.0k
        return true;
147
123k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&)
Line
Count
Source
138
67.4k
    bool tryGet(const Key &kIn, Value &vOut) {
139
67.4k
        Guard g(lock_);
140
67.4k
        const auto iter = cache_.find(kIn);
141
67.4k
        if (iter == cache_.end()) {
142
2.32k
            return false;
143
2.32k
        }
144
65.1k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
65.1k
        vOut = iter->second->value;
146
65.1k
        return true;
147
67.4k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::tryGet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Line
Count
Source
138
67.1k
    bool tryGet(const Key &kIn, Value &vOut) {
139
67.1k
        Guard g(lock_);
140
67.1k
        const auto iter = cache_.find(kIn);
141
67.1k
        if (iter == cache_.end()) {
142
2.13k
            return false;
143
2.13k
        }
144
65.0k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
65.0k
        vOut = iter->second->value;
146
65.0k
        return true;
147
67.1k
    }
148
    /**
149
     *  The const reference returned here is only
150
     *    guaranteed to be valid till the next insert/delete
151
     */
152
    const Value &get(const Key &key) {
153
        Guard g(lock_);
154
        const auto iter = cache_.find(key);
155
        if (iter == cache_.end()) {
156
            throw KeyNotFound();
157
        }
158
        keys_.splice(keys_.begin(), keys_, iter->second);
159
        return iter->second->value;
160
    }
161
162
    /**
163
     *  The const reference returned here is only
164
     *    guaranteed to be valid till the next insert/delete
165
     */
166
0
    const Value *getPtr(const Key &key) {
167
0
        Guard g(lock_);
168
0
        const auto iter = cache_.find(key);
169
0
        if (iter == cache_.end()) {
170
0
            return nullptr;
171
0
        }
172
0
        keys_.splice(keys_.begin(), keys_, iter->second);
173
0
        return &(iter->second->value);
174
0
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<float, std::__1::allocator<float> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*> > > > >::getPtr(unsigned long const&)
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*> > > > >::getPtr(unsigned long const&)
175
176
    /**
177
     * returns a copy of the stored object (if found)
178
     */
179
    Value getCopy(const Key &key) { return get(key); }
180
0
    bool remove(const Key &key) {
181
0
        Guard g(lock_);
182
0
        auto iter = cache_.find(key);
183
0
        if (iter == cache_.end()) {
184
0
            return false;
185
0
        }
186
0
        keys_.erase(iter->second);
187
0
        cache_.erase(iter);
188
0
        return true;
189
0
    }
190
    bool contains(const Key &key) {
191
        Guard g(lock_);
192
        return cache_.find(key) != cache_.end();
193
    }
194
195
    size_t getMaxSize() const { return maxSize_; }
196
    size_t getElasticity() const { return elasticity_; }
197
    size_t getMaxAllowedSize() const { return maxSize_ + elasticity_; }
198
0
    template <typename F> void cwalk(F &f) const {
199
0
        Guard g(lock_);
200
0
        std::for_each(keys_.begin(), keys_.end(), f);
201
0
    }
202
203
  protected:
204
179k
    size_t prune() {
205
179k
        size_t maxAllowed = maxSize_ + elasticity_;
206
179k
        if (maxSize_ == 0 ||
207
179k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
179k
            return 0;
209
179k
        }
210
289
        size_t count = 0;
211
3.46k
        while (cache_.size() > maxSize_) {
212
3.17k
            cache_.erase(keys_.back().key);
213
3.17k
            keys_.pop_back();
214
3.17k
            ++count;
215
3.17k
        }
216
289
        return count;
217
179k
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, std::__1::mutex, std::__1::unordered_map<osgeo::proj::NetworkChunkCache::Key, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*>, osgeo::proj::NetworkChunkCache::KeyHasher, std::__1::equal_to<osgeo::proj::NetworkChunkCache::Key>, std::__1::allocator<std::__1::pair<osgeo::proj::NetworkChunkCache::Key const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<osgeo::proj::NetworkChunkCache::Key, std::__1::shared_ptr<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >, void*> > > > >::prune()
Unexecuted instantiation: osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties, std::__1::mutex, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::FileProperties>, void*> > > > >::prune()
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::io::SQLiteHandle> >, void*> > > > >::prune()
Line
Count
Source
204
8.61k
    size_t prune() {
205
8.61k
        size_t maxAllowed = maxSize_ + elasticity_;
206
8.61k
        if (maxSize_ == 0 ||
207
8.61k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
8.61k
            return 0;
209
8.61k
        }
210
0
        size_t count = 0;
211
0
        while (cache_.size() > maxSize_) {
212
0
            cache_.erase(keys_.back().key);
213
0
            keys_.pop_back();
214
0
            ++count;
215
0
        }
216
0
        return count;
217
8.61k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject>, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::shared_ptr<osgeo::proj::util::BaseObject> >, void*> > > > >::prune()
Line
Count
Source
204
104k
    size_t prune() {
205
104k
        size_t maxAllowed = maxSize_ + elasticity_;
206
104k
        if (maxSize_ == 0 ||
207
104k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
104k
            return 0;
209
104k
        }
210
0
        size_t count = 0;
211
0
        while (cache_.size() > maxSize_) {
212
0
            cache_.erase(keys_.back().key);
213
0
            keys_.pop_back();
214
0
            ++count;
215
0
        }
216
0
        return count;
217
104k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> >, std::__1::allocator<dropbox::oxygen::nn<std::__1::shared_ptr<osgeo::proj::operation::CoordinateOperation> > > > >, void*> > > > >::prune()
Line
Count
Source
204
34.8k
    size_t prune() {
205
34.8k
        size_t maxAllowed = maxSize_ + elasticity_;
206
34.8k
        if (maxSize_ == 0 ||
207
34.8k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
34.5k
            return 0;
209
34.5k
        }
210
240
        size_t count = 0;
211
2.88k
        while (cache_.size() > maxSize_) {
212
2.64k
            cache_.erase(keys_.back().key);
213
2.64k
            keys_.pop_back();
214
2.64k
            ++count;
215
2.64k
        }
216
240
        return count;
217
34.8k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::io::DatabaseContext::Private::GridInfoCache>, void*> > > > >::prune()
Line
Count
Source
204
26.8k
    size_t prune() {
205
26.8k
        size_t maxAllowed = maxSize_ + elasticity_;
206
26.8k
        if (maxSize_ == 0 ||
207
26.8k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
26.7k
            return 0;
209
26.7k
        }
210
49
        size_t count = 0;
211
588
        while (cache_.size() > maxSize_) {
212
539
            cache_.erase(keys_.back().key);
213
539
            keys_.pop_back();
214
539
            ++count;
215
539
        }
216
49
        return count;
217
26.8k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::list<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void*> > > > >::prune()
Line
Count
Source
204
2.32k
    size_t prune() {
205
2.32k
        size_t maxAllowed = maxSize_ + elasticity_;
206
2.32k
        if (maxSize_ == 0 ||
207
2.32k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
2.32k
            return 0;
209
2.32k
        }
210
0
        size_t count = 0;
211
0
        while (cache_.size() > maxSize_) {
212
0
            cache_.erase(keys_.back().key);
213
0
            keys_.pop_back();
214
0
            ++count;
215
0
        }
216
0
        return count;
217
2.32k
    }
osgeo::proj::lru11::Cache<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, void*> > > > >::prune()
Line
Count
Source
204
2.13k
    size_t prune() {
205
2.13k
        size_t maxAllowed = maxSize_ + elasticity_;
206
2.13k
        if (maxSize_ == 0 ||
207
2.13k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
2.13k
            return 0;
209
2.13k
        }
210
0
        size_t count = 0;
211
0
        while (cache_.size() > maxSize_) {
212
0
            cache_.erase(keys_.back().key);
213
0
            keys_.pop_back();
214
0
            ++count;
215
0
        }
216
0
        return count;
217
2.13k
    }
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<float, std::__1::allocator<float> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<float, std::__1::allocator<float> > >, void*> > > > >::prune()
Unexecuted instantiation: osgeo::proj::lru11::Cache<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, osgeo::proj::lru11::NullLock, std::__1::unordered_map<unsigned long, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*>, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::__list_iterator<osgeo::proj::lru11::KeyValuePair<unsigned long, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > >, void*> > > > >::prune()
218
219
  private:
220
    // Disallow copying.
221
    Cache(const Cache &) = delete;
222
    Cache &operator=(const Cache &) = delete;
223
224
    mutable Lock lock_{};
225
    Map cache_{};
226
    list_type keys_{};
227
    size_t maxSize_;
228
    size_t elasticity_;
229
};
230
231
} // namespace lru11
232
NS_PROJ_END
233
234
/*! @endcond */