mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Cleaned up all of the operator new/delete usage
This commit is contained in:
parent
eeb561dd9a
commit
c463305e81
@ -36,11 +36,7 @@ public:
|
||||
nsFontMetricsGTK();
|
||||
virtual ~nsFontMetricsGTK();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -45,11 +45,7 @@ public:
|
||||
nsRenderingContextGTK();
|
||||
virtual ~nsRenderingContextGTK();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -34,11 +34,7 @@ public:
|
||||
nsFontMetricsMac();
|
||||
~nsFontMetricsMac();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -81,6 +81,8 @@ public:
|
||||
GraphicState(GraphicState* aGS);
|
||||
~GraphicState();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
void Clear();
|
||||
void Init(nsDrawingSurface aSurface);
|
||||
void Init(GrafPtr aPort);
|
||||
@ -90,13 +92,6 @@ public:
|
||||
protected:
|
||||
RgnHandle DuplicateRgn(RgnHandle aRgn);
|
||||
|
||||
public:
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
|
||||
public:
|
||||
nsTransform2D * mTMatrix; // transform that all the graphics drawn here will obey
|
||||
|
||||
|
@ -42,11 +42,7 @@ public:
|
||||
nsRenderingContextMac();
|
||||
~nsRenderingContextMac();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -34,11 +34,7 @@ public:
|
||||
nsFontMetricsMotif();
|
||||
~nsFontMetricsMotif();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -53,11 +53,7 @@ public:
|
||||
nsRenderingContextMotif();
|
||||
~nsRenderingContextMotif();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -46,11 +46,7 @@ public:
|
||||
|
||||
nsresult Init(nsIDeviceContext *aDeviceContext, nsIURLGroup* aURLGroup);
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -31,11 +31,7 @@ public:
|
||||
|
||||
nsresult Init();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -40,11 +40,7 @@ public:
|
||||
PRUint32 aFlags,
|
||||
ilINetContext* aNetContext);
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -31,11 +31,7 @@ public:
|
||||
ImageSystemServicesImpl();
|
||||
~ImageSystemServicesImpl();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -38,11 +38,7 @@ public:
|
||||
nsFontMetricsPS();
|
||||
virtual ~nsFontMetricsPS();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -44,11 +44,7 @@ public:
|
||||
nsRenderingContextPS();
|
||||
virtual ~nsRenderingContextPS();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -35,11 +35,7 @@ public:
|
||||
nsFontMetricsWin();
|
||||
~nsFontMetricsWin();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
@ -49,11 +49,7 @@ class nsRenderingContextWin : public nsIRenderingContext,
|
||||
public:
|
||||
nsRenderingContextWin();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user