From 03489a78662ea044a75cbd441af46a6dc9023fc4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 8 Mar 2000 13:56:46 +0000 Subject: Made work on GTK+/Linux. --- src/ViewStyle.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/ViewStyle.cxx') diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 122db6a00..976593de3 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -51,7 +51,7 @@ ViewStyle::ViewStyle() { ViewStyle::ViewStyle(const ViewStyle &source) { Init(); - for (int sty=0;sty<=STYLE_MAX;sty++) { + for (unsigned int sty=0;sty<(sizeof(styles)/sizeof(styles[0]));sty++) { styles[sty] = source.styles[sty]; } for (int mrk=0;mrk<=MARKER_MAX;mrk++) { @@ -163,9 +163,7 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(edgecolour, want); } -#include void ViewStyle::Refresh(Surface &surface) { -DWORD dwStart = timeGetTime(); selbar.desired = Platform::Chrome(); selbarlight.desired = Platform::ChromeHighlight(); maxAscent = 1; @@ -194,8 +192,6 @@ DWORD dwStart = timeGetTime(); if (ms[margin].width > 0) maskInLine &= ~ms[margin].mask; } -DWORD dwEnd = timeGetTime(); -Platform::DebugPrintf("Refresh took %d\n", dwEnd - dwStart); } void ViewStyle::ResetDefaultStyle() { @@ -206,7 +202,7 @@ void ViewStyle::ResetDefaultStyle() { void ViewStyle::ClearStyles() { // Reset all styles to be like the default style - for (int i=0; i<=STYLE_MAX; i++) { + for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { if (i != STYLE_DEFAULT) { styles[i].Clear( styles[STYLE_DEFAULT].fore.desired, -- cgit v1.2.3