From bdba6fdc0db2329dbe2d4fe45262631b1b506caa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Mar 2007 15:17:36 +0000 Subject: [PATCH] VC6 has problems with std::vector and identifiers names 'iterator' in GDI+ headers; switch to using our own stack class instead git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/graphics.cpp | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index cd9dd2a3bb..a9a9295682 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -20,28 +20,27 @@ #if wxUSE_GRAPHICS_CONTEXT #ifndef WX_PRECOMP -#include "wx/msw/wrapcdlg.h" -#include "wx/image.h" -#include "wx/window.h" -#include "wx/dc.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/app.h" -#include "wx/bitmap.h" -#include "wx/dcmemory.h" -#include "wx/log.h" -#include "wx/icon.h" -#include "wx/dcprint.h" -#include "wx/module.h" + #include "wx/msw/wrapcdlg.h" + #include "wx/image.h" + #include "wx/window.h" + #include "wx/dc.h" + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/app.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" + #include "wx/log.h" + #include "wx/icon.h" + #include "wx/dcprint.h" + #include "wx/module.h" #endif #include "wx/graphics.h" +#include "wx/msw/wrapgdip.h" -#include - -using namespace std; +#include "wx/stack.h" -#include "wx/msw/wrapgdip.h" +WX_DECLARE_STACK(GraphicsState, GraphicsStates); //----------------------------------------------------------------------------- // constants @@ -310,7 +309,7 @@ private: void SetDefaults(); Graphics* m_context; - vector m_stateStack; + GraphicsStates m_stateStack; GraphicsState m_state1; GraphicsState m_state2; @@ -953,13 +952,13 @@ void wxGDIPlusContext::Scale( wxDouble xScale , wxDouble yScale ) void wxGDIPlusContext::PushState() { GraphicsState state = m_context->Save(); - m_stateStack.push_back(state); + m_stateStack.push(state); } void wxGDIPlusContext::PopState() { - GraphicsState state = m_stateStack.back(); - m_stateStack.pop_back(); + GraphicsState state = m_stateStack.top(); + m_stateStack.pop(); m_context->Restore(state); } -- 2.47.2