From 933ee5b156fd8031a75b84bae5329843221208dc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 1 Jul 2011 05:38:20 +0200 Subject: GRAPHICS: Remove default values from FontSJIS::drawChar. drawChar is overloaded in FontSJIS. One takes a "Surface &" as first parameter another one "void *", they furthermore have the exact same number of required parameters. The one "void *" just had a few extra parameters with default values. This resulted in a bug in SCUMM, where "VirtScreen *" (a subclass of Surface) was passed instead of "VirtScreen &" and thus the method taking "void *" was incorrectly used. To make it easier to spot such bugs in the future I just removed the default values and thus disallow such calls. --- graphics/sjis.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'graphics/sjis.h') diff --git a/graphics/sjis.h b/graphics/sjis.h index 90357af446..58bcaf121f 100644 --- a/graphics/sjis.h +++ b/graphics/sjis.h @@ -123,10 +123,10 @@ public: * @param bpp bytes per pixel of the destination buffer * @param c1 forground color * @param c2 outline color - * @param maxW max draw width (to ensure that character drawing takes place within surface boundaries) - * @param maxH max draw height (to ensure that character drawing takes place within surface boundaries) + * @param maxW max draw width (to ensure that character drawing takes place within surface boundaries), -1 = no check + * @param maxH max draw height (to ensure that character drawing takes place within surface boundaries), -1 = no check */ - virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW = -1, int maxH = -1) const = 0; + virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const = 0; }; /** -- cgit v1.2.3