take 2 static CID's out of two different functions and combine them into 1 r=alecf fixes bug #15776

This commit is contained in:
pavlov%netscape.com 1999-10-13 05:42:05 +00:00
parent e1b3f6ad9c
commit a9baa2ba22

View File

@ -166,6 +166,8 @@ NS_IMETHODIMP DeviceContextImpl :: GetCanonicalPixelScale(float &aScale) const
return NS_OK;
}
static NS_DEFINE_CID(kRCCID, NS_RENDERING_CONTEXT_CID);
NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIView *aView, nsIRenderingContext *&aContext)
{
nsIRenderingContext *pContext;
@ -173,8 +175,6 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIView *aView, nsIRen
aView->GetWidget(win);
nsresult rv;
static NS_DEFINE_CID(kRCCID, NS_RENDERING_CONTEXT_CID);
aContext = nsnull;
rv = nsComponentManager::CreateInstance(kRCCID, nsnull, NS_GET_IID(nsIRenderingContext), (void **)&pContext);
@ -195,8 +195,6 @@ NS_IMETHODIMP DeviceContextImpl :: CreateRenderingContext(nsIWidget *aWidget, ns
nsIRenderingContext *pContext;
nsresult rv;
static NS_DEFINE_CID(kRCCID, NS_RENDERING_CONTEXT_CID);
aContext = nsnull;
rv = nsComponentManager::CreateInstance(kRCCID, nsnull, NS_GET_IID(nsIRenderingContext), (void **)&pContext);