summaryrefslogtreecommitdiff
path: root/core/src/fxge/agg
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxge/agg')
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h2
-rw-r--r--core/src/fxge/agg/src/fx_agg_driver.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index 77d2f2af6e..0e79a3fc5e 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -137,7 +137,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver {
CFX_DIBitmap* m_pBitmap;
CFX_ClipRgn* m_pClipRgn;
- CFX_PtrArray m_StateStack;
+ CFX_ArrayTemplate<CFX_ClipRgn*> m_StateStack;
void* m_pPlatformGraphics;
void* m_pPlatformBitmap;
void* m_pDwRenderTartget;
diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp
index 78186a8f96..4b3389bb4c 100644
--- a/core/src/fxge/agg/src/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/src/fx_agg_driver.cpp
@@ -211,7 +211,7 @@ CFX_AggDeviceDriver::CFX_AggDeviceDriver(CFX_DIBitmap* pBitmap,
CFX_AggDeviceDriver::~CFX_AggDeviceDriver() {
delete m_pClipRgn;
for (int i = 0; i < m_StateStack.GetSize(); i++)
- delete (CFX_ClipRgn*)m_StateStack[i];
+ delete m_StateStack[i];
DestroyPlatform();
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_
@@ -266,7 +266,7 @@ int CFX_AggDeviceDriver::GetDeviceCaps(int caps_id) {
return 0;
}
void CFX_AggDeviceDriver::SaveState() {
- void* pClip = NULL;
+ CFX_ClipRgn* pClip = NULL;
if (m_pClipRgn) {
pClip = new CFX_ClipRgn(*m_pClipRgn);
}
@@ -278,8 +278,7 @@ void CFX_AggDeviceDriver::RestoreState(FX_BOOL bKeepSaved) {
m_pClipRgn = NULL;
return;
}
- CFX_ClipRgn* pSavedClip =
- (CFX_ClipRgn*)m_StateStack[m_StateStack.GetSize() - 1];
+ CFX_ClipRgn* pSavedClip = m_StateStack[m_StateStack.GetSize() - 1];
delete m_pClipRgn;
m_pClipRgn = NULL;
if (bKeepSaved) {