--- a/src/polygoncache.h Thu Jun 09 13:32:55 2022 +0300 +++ b/src/polygoncache.h Thu Jun 09 19:11:27 2022 +0300 @@ -17,11 +17,13 @@ struct PolygonCache { - std::vector<WithId<PolygonElement>> cachedPolygons; + using vector_type = std::vector<WithId<PolygonElement>>; + vector_type cachedPolygons; bool needRecache = true; }; -const std::vector<WithId<PolygonElement>>& getCachedPolygons( +const PolygonCache::vector_type* getCachedPolygons( PolygonCache* cache, Model* model, class DocumentManager* documents); +PolygonCache* findPolygonCacheForModel(Model* model, DocumentManager* context);