From 068bfb9213d810b1551cdc48fdfd216060253103 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Jun 2014 12:50:03 +1000 Subject: Drawing and measuring should not change ViewStyle which is set by the container so mark ViewStyle parameters as const. Provide a FontAlias copy constructor and use it to work around non-const Font arguments to Surface when sourced from const ViewStyle. --- src/PositionCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PositionCache.h') diff --git a/src/PositionCache.h b/src/PositionCache.h index 614c81d38..53b407b71 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -189,7 +189,7 @@ public: void Clear(); void SetSize(size_t size_); size_t GetSize() const { return pces.size(); } - void MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned int styleNumber, + void MeasureWidths(Surface *surface, const ViewStyle &vstyle, unsigned int styleNumber, const char *s, unsigned int len, XYPOSITION *positions, Document *pdoc); }; -- cgit v1.2.3