From 77b174e27eb28ffce6794588d0de1433bffe7672 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/Style.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Style.h') diff --git a/src/Style.h b/src/Style.h index 4bd79de14..e8359e110 100644 --- a/src/Style.h +++ b/src/Style.h @@ -34,10 +34,10 @@ struct FontSpecification { // Just like Font but only has a copy of the FontID so should not delete it class FontAlias : public Font { // Private so FontAlias objects can not be copied - FontAlias(const FontAlias &); FontAlias &operator=(const FontAlias &); public: FontAlias(); + FontAlias(const FontAlias &); virtual ~FontAlias(); void MakeAlias(Font &fontOrigin); void ClearFont(); -- cgit v1.2.3