From 8a1a6e728aca7f59d3916f9a922425f55b2facce Mon Sep 17 00:00:00 2001 From: "pavlov%pavlov.net" Date: Fri, 20 Nov 1998 03:30:49 +0000 Subject: [PATCH] make sure we return a value for all of the NS_IMETHODIMP methods --- gfx/src/gtk/nsImageGTK.cpp | 4 ++-- gfx/src/gtk/nsRenderingContextGTK.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gfx/src/gtk/nsImageGTK.cpp b/gfx/src/gtk/nsImageGTK.cpp index 9f566efbc2a..1c17ff96b50 100644 --- a/gfx/src/gtk/nsImageGTK.cpp +++ b/gfx/src/gtk/nsImageGTK.cpp @@ -361,10 +361,10 @@ PRBool nsImageGTK::SetAlphaMask(nsIImage *aTheMask) srcbits = aTheMask->GetBits(); memcpy(mAlphaBits,srcbits,num); - return(PR_TRUE); + return PR_TRUE; } - return(PR_FALSE); + return PR_FALSE; } //------------------------------------------------------------ diff --git a/gfx/src/gtk/nsRenderingContextGTK.cpp b/gfx/src/gtk/nsRenderingContextGTK.cpp index 0418b3d667b..be305f0f659 100644 --- a/gfx/src/gtk/nsRenderingContextGTK.cpp +++ b/gfx/src/gtk/nsRenderingContextGTK.cpp @@ -275,7 +275,7 @@ NS_IMETHODIMP nsRenderingContextGTK::PopState(PRBool &aClipEmpty) } if (state->mColor != mCurrentColor) - SetColor(state->mColor); + SetColor(state->mColor); if (state->mLineStyle != mCurrentLineStyle) SetLineStyle(state->mLineStyle); @@ -392,7 +392,7 @@ NS_IMETHODIMP nsRenderingContextGTK::SetColor(nscolor aColor) * function (pav) */ ::gdk_rgb_gc_set_foreground(mRenderingSurface->gc, NS_TO_GDK_RGB(mCurrentColor)); - ::gdk_rgb_gc_set_background(mRenderingSurface->gc, NS_TO_GDK_RGB(mCurrentColor)); +// ::gdk_rgb_gc_set_background(mRenderingSurface->gc, NS_TO_GDK_RGB(mCurrentColor)); return NS_OK; } @@ -831,8 +831,9 @@ NS_IMETHODIMP nsRenderingContextGTK::GetWidth(const PRUnichar *aString, nsString nsStr; nsStr.SetString(aString, aLength); char* cStr = nsStr.ToNewCString(); - GetWidth(cStr, aLength, aWidth); + NS_IMETHODIMP ret = GetWidth(cStr, aLength, aWidth); delete[] cStr; + return ret; } NS_IMETHODIMP @@ -897,8 +898,9 @@ NS_IMETHODIMP nsRenderingContextGTK::DrawString(const PRUnichar *aString, PRUint nsString nsStr; nsStr.SetString(aString, aLength); char* cStr = nsStr.ToNewCString(); - DrawString(cStr, aLength, aX, aY, aWidth, aSpacing); + NS_IMETHODIMP ret = DrawString(cStr, aLength, aX, aY, aWidth, aSpacing); delete[] cStr; + return ret; } NS_IMETHODIMP nsRenderingContextGTK::DrawString(const nsString& aString,