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/Indicator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Indicator.cxx') diff --git a/src/Indicator.cxx b/src/Indicator.cxx index e51067a38..d8ad64ed6 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -23,7 +23,7 @@ static PRectangle PixelGridAlign(const PRectangle &rc) { return PRectangle::FromInts(int(rc.left + 0.5), int(rc.top), int(rc.right + 0.5), int(rc.bottom)); } -void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) { +void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) const { surface->PenColour(fore); int ymid = static_cast(rc.bottom + rc.top) / 2; if (style == INDIC_SQUIGGLE) { -- cgit v1.2.3