Coverage Report

Created: 2025-07-23 06:58

/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.31M
    void lock() {}
52
    // cppcheck-suppress functionStatic
53
2.31M
    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
217k
    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
10.9k
    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
128k
    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
38.5k
    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
34.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
2.89k
    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.62k
    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
131k
        : 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
87.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::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
10.9k
        : 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
10.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::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
10.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::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
10.9k
        : 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
131k
    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
10.9k
    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
10.9k
    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
10.9k
    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
87.7k
    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
10.9k
    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
37.8k
    void clear() {
121
37.8k
        Guard g(lock_);
122
37.8k
        cache_.clear();
123
37.8k
        keys_.clear();
124
37.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
12.6k
    void clear() {
121
12.6k
        Guard g(lock_);
122
12.6k
        cache_.clear();
123
12.6k
        keys_.clear();
124
12.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
12.6k
    void clear() {
121
12.6k
        Guard g(lock_);
122
12.6k
        cache_.clear();
123
12.6k
        keys_.clear();
124
12.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
12.6k
    void clear() {
121
12.6k
        Guard g(lock_);
122
12.6k
        cache_.clear();
123
12.6k
        keys_.clear();
124
12.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
217k
    void insert(const Key &key, const Value &v) {
126
217k
        Guard g(lock_);
127
217k
        const auto iter = cache_.find(key);
128
217k
        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
217k
        keys_.emplace_front(key, v);
135
217k
        cache_[key] = keys_.begin();
136
217k
        prune();
137
217k
    }
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
10.9k
    void insert(const Key &key, const Value &v) {
126
10.9k
        Guard g(lock_);
127
10.9k
        const auto iter = cache_.find(key);
128
10.9k
        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
10.9k
        keys_.emplace_front(key, v);
135
10.9k
        cache_[key] = keys_.begin();
136
10.9k
        prune();
137
10.9k
    }
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
128k
    void insert(const Key &key, const Value &v) {
126
128k
        Guard g(lock_);
127
128k
        const auto iter = cache_.find(key);
128
128k
        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
128k
        keys_.emplace_front(key, v);
135
128k
        cache_[key] = keys_.begin();
136
128k
        prune();
137
128k
    }
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
38.5k
    void insert(const Key &key, const Value &v) {
126
38.5k
        Guard g(lock_);
127
38.5k
        const auto iter = cache_.find(key);
128
38.5k
        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
38.5k
        keys_.emplace_front(key, v);
135
38.5k
        cache_[key] = keys_.begin();
136
38.5k
        prune();
137
38.5k
    }
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
34.3k
    void insert(const Key &key, const Value &v) {
126
34.3k
        Guard g(lock_);
127
34.3k
        const auto iter = cache_.find(key);
128
34.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
34.3k
        keys_.emplace_front(key, v);
135
34.3k
        cache_[key] = keys_.begin();
136
34.3k
        prune();
137
34.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
2.89k
    void insert(const Key &key, const Value &v) {
126
2.89k
        Guard g(lock_);
127
2.89k
        const auto iter = cache_.find(key);
128
2.89k
        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.89k
        keys_.emplace_front(key, v);
135
2.89k
        cache_[key] = keys_.begin();
136
2.89k
        prune();
137
2.89k
    }
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.62k
    void insert(const Key &key, const Value &v) {
126
2.62k
        Guard g(lock_);
127
2.62k
        const auto iter = cache_.find(key);
128
2.62k
        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.62k
        keys_.emplace_front(key, v);
135
2.62k
        cache_[key] = keys_.begin();
136
2.62k
        prune();
137
2.62k
    }
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.08M
    bool tryGet(const Key &kIn, Value &vOut) {
139
2.08M
        Guard g(lock_);
140
2.08M
        const auto iter = cache_.find(kIn);
141
2.08M
        if (iter == cache_.end()) {
142
266k
            return false;
143
266k
        }
144
1.81M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.81M
        vOut = iter->second->value;
146
1.81M
        return true;
147
2.08M
    }
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
10.9k
    bool tryGet(const Key &kIn, Value &vOut) {
139
10.9k
        Guard g(lock_);
140
10.9k
        const auto iter = cache_.find(kIn);
141
10.9k
        if (iter == cache_.end()) {
142
10.9k
            return false;
143
10.9k
        }
144
5
        keys_.splice(keys_.begin(), keys_, iter->second);
145
5
        vOut = iter->second->value;
146
5
        return true;
147
10.9k
    }
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.63M
    bool tryGet(const Key &kIn, Value &vOut) {
139
1.63M
        Guard g(lock_);
140
1.63M
        const auto iter = cache_.find(kIn);
141
1.63M
        if (iter == cache_.end()) {
142
176k
            return false;
143
176k
        }
144
1.46M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.46M
        vOut = iter->second->value;
146
1.46M
        return true;
147
1.63M
    }
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
147k
    bool tryGet(const Key &kIn, Value &vOut) {
139
147k
        Guard g(lock_);
140
147k
        const auto iter = cache_.find(kIn);
141
147k
        if (iter == cache_.end()) {
142
38.5k
            return false;
143
38.5k
        }
144
108k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
108k
        vOut = iter->second->value;
146
108k
        return true;
147
147k
    }
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
129k
    bool tryGet(const Key &kIn, Value &vOut) {
139
129k
        Guard g(lock_);
140
129k
        const auto iter = cache_.find(kIn);
141
129k
        if (iter == cache_.end()) {
142
34.3k
            return false;
143
34.3k
        }
144
95.1k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
95.1k
        vOut = iter->second->value;
146
95.1k
        return true;
147
129k
    }
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
78.0k
    bool tryGet(const Key &kIn, Value &vOut) {
139
78.0k
        Guard g(lock_);
140
78.0k
        const auto iter = cache_.find(kIn);
141
78.0k
        if (iter == cache_.end()) {
142
2.89k
            return false;
143
2.89k
        }
144
75.1k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
75.1k
        vOut = iter->second->value;
146
75.1k
        return true;
147
78.0k
    }
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
77.6k
    bool tryGet(const Key &kIn, Value &vOut) {
139
77.6k
        Guard g(lock_);
140
77.6k
        const auto iter = cache_.find(kIn);
141
77.6k
        if (iter == cache_.end()) {
142
2.62k
            return false;
143
2.62k
        }
144
75.0k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
75.0k
        vOut = iter->second->value;
146
75.0k
        return true;
147
77.6k
    }
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
217k
    size_t prune() {
205
217k
        size_t maxAllowed = maxSize_ + elasticity_;
206
217k
        if (maxSize_ == 0 ||
207
217k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
217k
            return 0;
209
217k
        }
210
341
        size_t count = 0;
211
4.09k
        while (cache_.size() > maxSize_) {
212
3.75k
            cache_.erase(keys_.back().key);
213
3.75k
            keys_.pop_back();
214
3.75k
            ++count;
215
3.75k
        }
216
341
        return count;
217
217k
    }
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
10.9k
    size_t prune() {
205
10.9k
        size_t maxAllowed = maxSize_ + elasticity_;
206
10.9k
        if (maxSize_ == 0 ||
207
10.9k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
10.9k
            return 0;
209
10.9k
        }
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
10.9k
    }
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
128k
    size_t prune() {
205
128k
        size_t maxAllowed = maxSize_ + elasticity_;
206
128k
        if (maxSize_ == 0 ||
207
128k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
128k
            return 0;
209
128k
        }
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
128k
    }
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
38.5k
    size_t prune() {
205
38.5k
        size_t maxAllowed = maxSize_ + elasticity_;
206
38.5k
        if (maxSize_ == 0 ||
207
38.5k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
38.3k
            return 0;
209
38.3k
        }
210
272
        size_t count = 0;
211
3.26k
        while (cache_.size() > maxSize_) {
212
2.99k
            cache_.erase(keys_.back().key);
213
2.99k
            keys_.pop_back();
214
2.99k
            ++count;
215
2.99k
        }
216
272
        return count;
217
38.5k
    }
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
34.3k
    size_t prune() {
205
34.3k
        size_t maxAllowed = maxSize_ + elasticity_;
206
34.3k
        if (maxSize_ == 0 ||
207
34.3k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
34.2k
            return 0;
209
34.2k
        }
210
69
        size_t count = 0;
211
828
        while (cache_.size() > maxSize_) {
212
759
            cache_.erase(keys_.back().key);
213
759
            keys_.pop_back();
214
759
            ++count;
215
759
        }
216
69
        return count;
217
34.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
2.89k
    size_t prune() {
205
2.89k
        size_t maxAllowed = maxSize_ + elasticity_;
206
2.89k
        if (maxSize_ == 0 ||
207
2.89k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
2.89k
            return 0;
209
2.89k
        }
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.89k
    }
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.62k
    size_t prune() {
205
2.62k
        size_t maxAllowed = maxSize_ + elasticity_;
206
2.62k
        if (maxSize_ == 0 ||
207
2.62k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
2.62k
            return 0;
209
2.62k
        }
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.62k
    }
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 */