Coverage Report

Created: 2025-07-18 07:18

/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
3.08M
    void lock() {}
52
    // cppcheck-suppress functionStatic
53
3.08M
    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
272k
    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
12.7k
    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
155k
    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
52.3k
    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
44.3k
    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
3.77k
    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
3.44k
    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
152k
        : 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
101k
        : 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
12.7k
        : 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
12.7k
        : 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
12.7k
        : 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
12.7k
        : 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
152k
    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
12.7k
    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
12.7k
    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
12.7k
    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
101k
    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
12.7k
    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
43.8k
    void clear() {
121
43.8k
        Guard g(lock_);
122
43.8k
        cache_.clear();
123
43.8k
        keys_.clear();
124
43.8k
    }
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
14.6k
    void clear() {
121
14.6k
        Guard g(lock_);
122
14.6k
        cache_.clear();
123
14.6k
        keys_.clear();
124
14.6k
    }
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
14.6k
    void clear() {
121
14.6k
        Guard g(lock_);
122
14.6k
        cache_.clear();
123
14.6k
        keys_.clear();
124
14.6k
    }
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
14.6k
    void clear() {
121
14.6k
        Guard g(lock_);
122
14.6k
        cache_.clear();
123
14.6k
        keys_.clear();
124
14.6k
    }
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
272k
    void insert(const Key &key, const Value &v) {
126
272k
        Guard g(lock_);
127
272k
        const auto iter = cache_.find(key);
128
272k
        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
272k
        keys_.emplace_front(key, v);
135
272k
        cache_[key] = keys_.begin();
136
272k
        prune();
137
272k
    }
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
12.7k
    void insert(const Key &key, const Value &v) {
126
12.7k
        Guard g(lock_);
127
12.7k
        const auto iter = cache_.find(key);
128
12.7k
        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
12.7k
        keys_.emplace_front(key, v);
135
12.7k
        cache_[key] = keys_.begin();
136
12.7k
        prune();
137
12.7k
    }
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
155k
    void insert(const Key &key, const Value &v) {
126
155k
        Guard g(lock_);
127
155k
        const auto iter = cache_.find(key);
128
155k
        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
155k
        keys_.emplace_front(key, v);
135
155k
        cache_[key] = keys_.begin();
136
155k
        prune();
137
155k
    }
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
52.3k
    void insert(const Key &key, const Value &v) {
126
52.3k
        Guard g(lock_);
127
52.3k
        const auto iter = cache_.find(key);
128
52.3k
        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
52.3k
        keys_.emplace_front(key, v);
135
52.3k
        cache_[key] = keys_.begin();
136
52.3k
        prune();
137
52.3k
    }
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
44.3k
    void insert(const Key &key, const Value &v) {
126
44.3k
        Guard g(lock_);
127
44.3k
        const auto iter = cache_.find(key);
128
44.3k
        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
44.3k
        keys_.emplace_front(key, v);
135
44.3k
        cache_[key] = keys_.begin();
136
44.3k
        prune();
137
44.3k
    }
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
3.77k
    void insert(const Key &key, const Value &v) {
126
3.77k
        Guard g(lock_);
127
3.77k
        const auto iter = cache_.find(key);
128
3.77k
        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
3.77k
        keys_.emplace_front(key, v);
135
3.77k
        cache_[key] = keys_.begin();
136
3.77k
        prune();
137
3.77k
    }
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
3.44k
    void insert(const Key &key, const Value &v) {
126
3.44k
        Guard g(lock_);
127
3.44k
        const auto iter = cache_.find(key);
128
3.44k
        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
3.44k
        keys_.emplace_front(key, v);
135
3.44k
        cache_[key] = keys_.begin();
136
3.44k
        prune();
137
3.44k
    }
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
2.80M
    bool tryGet(const Key &kIn, Value &vOut) {
139
2.80M
        Guard g(lock_);
140
2.80M
        const auto iter = cache_.find(kIn);
141
2.80M
        if (iter == cache_.end()) {
142
330k
            return false;
143
330k
        }
144
2.46M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
2.46M
        vOut = iter->second->value;
146
2.46M
        return true;
147
2.80M
    }
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
12.7k
    bool tryGet(const Key &kIn, Value &vOut) {
139
12.7k
        Guard g(lock_);
140
12.7k
        const auto iter = cache_.find(kIn);
141
12.7k
        if (iter == cache_.end()) {
142
12.7k
            return false;
143
12.7k
        }
144
7
        keys_.splice(keys_.begin(), keys_, iter->second);
145
7
        vOut = iter->second->value;
146
7
        return true;
147
12.7k
    }
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
2.19M
    bool tryGet(const Key &kIn, Value &vOut) {
139
2.19M
        Guard g(lock_);
140
2.19M
        const auto iter = cache_.find(kIn);
141
2.19M
        if (iter == cache_.end()) {
142
214k
            return false;
143
214k
        }
144
1.97M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.97M
        vOut = iter->second->value;
146
1.97M
        return true;
147
2.19M
    }
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
206k
    bool tryGet(const Key &kIn, Value &vOut) {
139
206k
        Guard g(lock_);
140
206k
        const auto iter = cache_.find(kIn);
141
206k
        if (iter == cache_.end()) {
142
52.3k
            return false;
143
52.3k
        }
144
153k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
153k
        vOut = iter->second->value;
146
153k
        return true;
147
206k
    }
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
171k
    bool tryGet(const Key &kIn, Value &vOut) {
139
171k
        Guard g(lock_);
140
171k
        const auto iter = cache_.find(kIn);
141
171k
        if (iter == cache_.end()) {
142
44.3k
            return false;
143
44.3k
        }
144
127k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
127k
        vOut = iter->second->value;
146
127k
        return true;
147
171k
    }
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
110k
    bool tryGet(const Key &kIn, Value &vOut) {
139
110k
        Guard g(lock_);
140
110k
        const auto iter = cache_.find(kIn);
141
110k
        if (iter == cache_.end()) {
142
3.77k
            return false;
143
3.77k
        }
144
106k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
106k
        vOut = iter->second->value;
146
106k
        return true;
147
110k
    }
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
109k
    bool tryGet(const Key &kIn, Value &vOut) {
139
109k
        Guard g(lock_);
140
109k
        const auto iter = cache_.find(kIn);
141
109k
        if (iter == cache_.end()) {
142
3.44k
            return false;
143
3.44k
        }
144
106k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
106k
        vOut = iter->second->value;
146
106k
        return true;
147
109k
    }
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
272k
    size_t prune() {
205
272k
        size_t maxAllowed = maxSize_ + elasticity_;
206
272k
        if (maxSize_ == 0 ||
207
272k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
271k
            return 0;
209
271k
        }
210
462
        size_t count = 0;
211
5.54k
        while (cache_.size() > maxSize_) {
212
5.08k
            cache_.erase(keys_.back().key);
213
5.08k
            keys_.pop_back();
214
5.08k
            ++count;
215
5.08k
        }
216
462
        return count;
217
272k
    }
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
12.7k
    size_t prune() {
205
12.7k
        size_t maxAllowed = maxSize_ + elasticity_;
206
12.7k
        if (maxSize_ == 0 ||
207
12.7k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
12.7k
            return 0;
209
12.7k
        }
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
12.7k
    }
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
155k
    size_t prune() {
205
155k
        size_t maxAllowed = maxSize_ + elasticity_;
206
155k
        if (maxSize_ == 0 ||
207
155k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
155k
            return 0;
209
155k
        }
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
155k
    }
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
52.3k
    size_t prune() {
205
52.3k
        size_t maxAllowed = maxSize_ + elasticity_;
206
52.3k
        if (maxSize_ == 0 ||
207
52.3k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
51.9k
            return 0;
209
51.9k
        }
210
384
        size_t count = 0;
211
4.60k
        while (cache_.size() > maxSize_) {
212
4.22k
            cache_.erase(keys_.back().key);
213
4.22k
            keys_.pop_back();
214
4.22k
            ++count;
215
4.22k
        }
216
384
        return count;
217
52.3k
    }
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
44.3k
    size_t prune() {
205
44.3k
        size_t maxAllowed = maxSize_ + elasticity_;
206
44.3k
        if (maxSize_ == 0 ||
207
44.3k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
44.2k
            return 0;
209
44.2k
        }
210
78
        size_t count = 0;
211
936
        while (cache_.size() > maxSize_) {
212
858
            cache_.erase(keys_.back().key);
213
858
            keys_.pop_back();
214
858
            ++count;
215
858
        }
216
78
        return count;
217
44.3k
    }
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
3.77k
    size_t prune() {
205
3.77k
        size_t maxAllowed = maxSize_ + elasticity_;
206
3.77k
        if (maxSize_ == 0 ||
207
3.77k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
3.77k
            return 0;
209
3.77k
        }
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
3.77k
    }
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
3.44k
    size_t prune() {
205
3.44k
        size_t maxAllowed = maxSize_ + elasticity_;
206
3.44k
        if (maxSize_ == 0 ||
207
3.44k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
3.44k
            return 0;
209
3.44k
        }
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
3.44k
    }
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 */