Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/base_tests/fifo_cache_test.cpp12
-rw-r--r--base/fifo_cache.hpp2
-rw-r--r--routing/geometry.hpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/base/base_tests/fifo_cache_test.cpp b/base/base_tests/fifo_cache_test.cpp
index b80190ad46..f9fa25e8a6 100644
--- a/base/base_tests/fifo_cache_test.cpp
+++ b/base/base_tests/fifo_cache_test.cpp
@@ -23,10 +23,10 @@ public:
bool IsValid() const
{
- std::set<Key> listKeys(m_cache.m_list.cbegin(), m_cache.m_list.cend());
- std::set<Key> mapKeys;
+ set<Key> listKeys(m_cache.m_list.cbegin(), m_cache.m_list.cend());
+ set<Key> mapKeys;
- for (auto const & kv :m_cache. m_map)
+ for (auto const & kv : m_cache.m_map)
mapKeys.insert(kv.first);
return listKeys == mapKeys;
@@ -36,7 +36,7 @@ private:
FifoCache<Key, Value> m_cache;
};
-UNIT_TEST(FifoCacheSmokeTest)
+UNIT_TEST(FifoCache_Smoke)
{
using Key = int;
using Value = int;
@@ -50,7 +50,7 @@ UNIT_TEST(FifoCacheSmokeTest)
TEST(cache.IsValid(), ());
}
-UNIT_TEST(FifoCacheTest)
+UNIT_TEST(FifoCache)
{
using Key = int;
using Value = int;
@@ -77,7 +77,7 @@ UNIT_TEST(FifoCacheTest)
}
}
-UNIT_TEST(FifoCacheLoaderCallsTest)
+UNIT_TEST(FifoCache_LoaderCalls)
{
using Key = int;
using Value = int;
diff --git a/base/fifo_cache.hpp b/base/fifo_cache.hpp
index da4665d57f..0eeb8dc4c4 100644
--- a/base/fifo_cache.hpp
+++ b/base/fifo_cache.hpp
@@ -34,7 +34,7 @@ public:
auto & v = m_map[key];
m_loader(key, v);
- return (m_map[key] = v);
+ return v;
}
private:
diff --git a/routing/geometry.hpp b/routing/geometry.hpp
index 62913c37b5..17c5ecae06 100644
--- a/routing/geometry.hpp
+++ b/routing/geometry.hpp
@@ -90,9 +90,9 @@ public:
};
/// \brief This class supports loading geometry of roads for routing.
-/// \note Loaded information about road geometry is kept in evicted cache |m_featureIdToRoad|.
+/// \note Loaded information about road geometry is kept in a fixed-size cache |m_featureIdToRoad|.
/// On the other hand methods GetRoad() and GetPoint() return geometry information by reference.
-/// The reference is valid until the next call of GetRoad() or GetPoint() because the cache
+/// The reference may be invalid after the next call of GetRoad() or GetPoint() because the cache
/// item which is referred by returned reference may be evicted. It's done for performance reasons.
class Geometry final
{