From 9d0bfa9d4e58959d932feb15dd0bd3c924f46dea Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 9 Mar 2012 14:47:04 -0800 Subject: [PATCH] the std::map storing font_face pointers is a cache - name it clearly --- include/mapnik/font_engine_freetype.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/mapnik/font_engine_freetype.hpp b/include/mapnik/font_engine_freetype.hpp index b8b91ea7b..ab8cad809 100644 --- a/include/mapnik/font_engine_freetype.hpp +++ b/include/mapnik/font_engine_freetype.hpp @@ -263,7 +263,7 @@ template class MAPNIK_DECL face_manager : private boost::noncopyable { typedef T font_engine_type; - typedef std::map faces; + typedef std::map face_ptr_cache_type; public: face_manager(T & engine) @@ -272,9 +272,9 @@ public: face_ptr get_face(std::string const& name) { - typename faces::iterator itr; - itr = faces_.find(name); - if (itr != faces_.end()) + face_ptr_cache_type::iterator itr; + itr = face_ptr_cache_.find(name); + if (itr != face_ptr_cache_.end()) { return itr->second; } @@ -283,7 +283,7 @@ public: face_ptr face = engine_.create_face(name); if (face) { - faces_.insert(make_pair(name,face)); + face_ptr_cache_.insert(make_pair(name,face)); } return face; } @@ -335,7 +335,7 @@ public: } private: - faces faces_; + face_ptr_cache_type face_ptr_cache_; font_engine_type & engine_; stroker_ptr stroker_; };