From c45ce5cc4e54bdae2fd45a130d8957ec55b51b1b Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 14:12:12 +0000 Subject: A few fixes recommended by PVS Studio --- nGenEx/Font.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nGenEx/Font.cpp') diff --git a/nGenEx/Font.cpp b/nGenEx/Font.cpp index 04127c6..02dca6a 100644 --- a/nGenEx/Font.cpp +++ b/nGenEx/Font.cpp @@ -416,7 +416,7 @@ Font::FindEdges(BYTE c, double* l, double* r) static bool nokern(char c) { - if (c <= Font::ARROW_RIGHT || c >= 128) + if (c <= Font::ARROW_RIGHT) return true; const char* nokernchars = "0123456789+=<>-.,:;?'\""; @@ -917,14 +917,13 @@ Font::DrawTextMulti(const char* text, int count, const Rect& text_rect, Rect& cl else if (flags & DT_CENTER) align = DT_CENTER; - int nlines = 1; int max_width = 0; int line_start = 0; int count_remaining = count; int xoffset = 0; int yoffset = 0; - nlines = 0; + int nlines = 0; // repeat for each line of text: while (count_remaining > 0) { -- cgit v1.1