Coverage Report

Created: 2026-01-22 07:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/PROJ/include/proj/internal/lru_cache.hpp
Line
Count
Source
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.26M
    void lock() {}
52
    // cppcheck-suppress functionStatic
53
2.26M
    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
169k
    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
7.26k
    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
95.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::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
36.6k
    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
22.2k
    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
5.16k
    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.00k
    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
87.1k
        : 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
58.1k
        : 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
7.26k
        : 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
7.26k
        : 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
7.26k
        : 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
7.26k
        : 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
87.1k
    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
7.26k
    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
7.26k
    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
7.26k
    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
58.1k
    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
7.26k
    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
24.9k
    void clear() {
121
24.9k
        Guard g(lock_);
122
24.9k
        cache_.clear();
123
24.9k
        keys_.clear();
124
24.9k
    }
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
8.33k
    void clear() {
121
8.33k
        Guard g(lock_);
122
8.33k
        cache_.clear();
123
8.33k
        keys_.clear();
124
8.33k
    }
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
8.33k
    void clear() {
121
8.33k
        Guard g(lock_);
122
8.33k
        cache_.clear();
123
8.33k
        keys_.clear();
124
8.33k
    }
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
8.33k
    void clear() {
121
8.33k
        Guard g(lock_);
122
8.33k
        cache_.clear();
123
8.33k
        keys_.clear();
124
8.33k
    }
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
169k
    void insert(const Key &key, const Value &v) {
126
169k
        Guard g(lock_);
127
169k
        const auto iter = cache_.find(key);
128
169k
        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
169k
        keys_.emplace_front(key, v);
135
169k
        cache_[key] = keys_.begin();
136
169k
        prune();
137
169k
    }
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
7.26k
    void insert(const Key &key, const Value &v) {
126
7.26k
        Guard g(lock_);
127
7.26k
        const auto iter = cache_.find(key);
128
7.26k
        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
7.26k
        keys_.emplace_front(key, v);
135
7.26k
        cache_[key] = keys_.begin();
136
7.26k
        prune();
137
7.26k
    }
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
95.9k
    void insert(const Key &key, const Value &v) {
126
95.9k
        Guard g(lock_);
127
95.9k
        const auto iter = cache_.find(key);
128
95.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
95.9k
        keys_.emplace_front(key, v);
135
95.9k
        cache_[key] = keys_.begin();
136
95.9k
        prune();
137
95.9k
    }
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
36.6k
    void insert(const Key &key, const Value &v) {
126
36.6k
        Guard g(lock_);
127
36.6k
        const auto iter = cache_.find(key);
128
36.6k
        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
36.6k
        keys_.emplace_front(key, v);
135
36.6k
        cache_[key] = keys_.begin();
136
36.6k
        prune();
137
36.6k
    }
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
22.2k
    void insert(const Key &key, const Value &v) {
126
22.2k
        Guard g(lock_);
127
22.2k
        const auto iter = cache_.find(key);
128
22.2k
        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
22.2k
        keys_.emplace_front(key, v);
135
22.2k
        cache_[key] = keys_.begin();
136
22.2k
        prune();
137
22.2k
    }
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
5.16k
    void insert(const Key &key, const Value &v) {
126
5.16k
        Guard g(lock_);
127
5.16k
        const auto iter = cache_.find(key);
128
5.16k
        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
5.16k
        keys_.emplace_front(key, v);
135
5.16k
        cache_[key] = keys_.begin();
136
5.16k
        prune();
137
5.16k
    }
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.00k
    void insert(const Key &key, const Value &v) {
126
2.00k
        Guard g(lock_);
127
2.00k
        const auto iter = cache_.find(key);
128
2.00k
        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.00k
        keys_.emplace_front(key, v);
135
2.00k
        cache_[key] = keys_.begin();
136
2.00k
        prune();
137
2.00k
    }
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
210k
            return false;
143
210k
        }
144
1.87M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.87M
        vOut = iter->second->value;
146
1.87M
        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
7.26k
    bool tryGet(const Key &kIn, Value &vOut) {
139
7.26k
        Guard g(lock_);
140
7.26k
        const auto iter = cache_.find(kIn);
141
7.26k
        if (iter == cache_.end()) {
142
7.26k
            return false;
143
7.26k
        }
144
2
        keys_.splice(keys_.begin(), keys_, iter->second);
145
2
        vOut = iter->second->value;
146
2
        return true;
147
7.26k
    }
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.40M
    bool tryGet(const Key &kIn, Value &vOut) {
139
1.40M
        Guard g(lock_);
140
1.40M
        const auto iter = cache_.find(kIn);
141
1.40M
        if (iter == cache_.end()) {
142
136k
            return false;
143
136k
        }
144
1.26M
        keys_.splice(keys_.begin(), keys_, iter->second);
145
1.26M
        vOut = iter->second->value;
146
1.26M
        return true;
147
1.40M
    }
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
146k
    bool tryGet(const Key &kIn, Value &vOut) {
139
146k
        Guard g(lock_);
140
146k
        const auto iter = cache_.find(kIn);
141
146k
        if (iter == cache_.end()) {
142
36.6k
            return false;
143
36.6k
        }
144
110k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
110k
        vOut = iter->second->value;
146
110k
        return true;
147
146k
    }
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
96.5k
    bool tryGet(const Key &kIn, Value &vOut) {
139
96.5k
        Guard g(lock_);
140
96.5k
        const auto iter = cache_.find(kIn);
141
96.5k
        if (iter == cache_.end()) {
142
22.2k
            return false;
143
22.2k
        }
144
74.2k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
74.2k
        vOut = iter->second->value;
146
74.2k
        return true;
147
96.5k
    }
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
291k
    bool tryGet(const Key &kIn, Value &vOut) {
139
291k
        Guard g(lock_);
140
291k
        const auto iter = cache_.find(kIn);
141
291k
        if (iter == cache_.end()) {
142
5.16k
            return false;
143
5.16k
        }
144
286k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
286k
        vOut = iter->second->value;
146
286k
        return true;
147
291k
    }
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
141k
    bool tryGet(const Key &kIn, Value &vOut) {
139
141k
        Guard g(lock_);
140
141k
        const auto iter = cache_.find(kIn);
141
141k
        if (iter == cache_.end()) {
142
2.00k
            return false;
143
2.00k
        }
144
139k
        keys_.splice(keys_.begin(), keys_, iter->second);
145
139k
        vOut = iter->second->value;
146
139k
        return true;
147
141k
    }
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
169k
    size_t prune() {
205
169k
        size_t maxAllowed = maxSize_ + elasticity_;
206
169k
        if (maxSize_ == 0 ||
207
169k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
168k
            return 0;
209
168k
        }
210
367
        size_t count = 0;
211
4.40k
        while (cache_.size() > maxSize_) {
212
4.03k
            cache_.erase(keys_.back().key);
213
4.03k
            keys_.pop_back();
214
4.03k
            ++count;
215
4.03k
        }
216
367
        return count;
217
169k
    }
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
7.26k
    size_t prune() {
205
7.26k
        size_t maxAllowed = maxSize_ + elasticity_;
206
7.26k
        if (maxSize_ == 0 ||
207
7.26k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
7.26k
            return 0;
209
7.26k
        }
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
7.26k
    }
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
95.9k
    size_t prune() {
205
95.9k
        size_t maxAllowed = maxSize_ + elasticity_;
206
95.9k
        if (maxSize_ == 0 ||
207
95.9k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
95.9k
            return 0;
209
95.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
95.9k
    }
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
36.6k
    size_t prune() {
205
36.6k
        size_t maxAllowed = maxSize_ + elasticity_;
206
36.6k
        if (maxSize_ == 0 ||
207
36.6k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
36.3k
            return 0;
209
36.3k
        }
210
313
        size_t count = 0;
211
3.75k
        while (cache_.size() > maxSize_) {
212
3.44k
            cache_.erase(keys_.back().key);
213
3.44k
            keys_.pop_back();
214
3.44k
            ++count;
215
3.44k
        }
216
313
        return count;
217
36.6k
    }
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
22.2k
    size_t prune() {
205
22.2k
        size_t maxAllowed = maxSize_ + elasticity_;
206
22.2k
        if (maxSize_ == 0 ||
207
22.2k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
22.1k
            return 0;
209
22.1k
        }
210
54
        size_t count = 0;
211
648
        while (cache_.size() > maxSize_) {
212
594
            cache_.erase(keys_.back().key);
213
594
            keys_.pop_back();
214
594
            ++count;
215
594
        }
216
54
        return count;
217
22.2k
    }
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
5.16k
    size_t prune() {
205
5.16k
        size_t maxAllowed = maxSize_ + elasticity_;
206
5.16k
        if (maxSize_ == 0 ||
207
5.16k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
5.16k
            return 0;
209
5.16k
        }
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
5.16k
    }
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.00k
    size_t prune() {
205
2.00k
        size_t maxAllowed = maxSize_ + elasticity_;
206
2.00k
        if (maxSize_ == 0 ||
207
2.00k
            cache_.size() <= maxAllowed) { /* ERO: changed < to <= */
208
2.00k
            return 0;
209
2.00k
        }
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.00k
    }
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 */