]> git.saurik.com Git - wxWidgets.git/commitdiff
Make wxCocoa work with wxUSE_STL==1:
authorDavid Elliott <dfe@tgwbd.org>
Fri, 26 Mar 2004 03:11:51 +0000 (03:11 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Fri, 26 Mar 2004 03:11:51 +0000 (03:11 +0000)
Use compatibility_iterator instead of Node and Erase instead of DeleteNode

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cocoa/dc.h
src/cocoa/dc.mm

index f7f46012ceb74604e437944768ff895aabbcb11a..f1bc6b4592f0bbc640367603f797222014c85321 100644 (file)
@@ -46,7 +46,7 @@ protected:
     bool CocoaUnwindStackAndTakeFocus();
     inline bool CocoaTakeFocus()
     {
-        wxCocoaDCStack::Node *node = sm_cocoaDCStack.GetFirst();
+        wxCocoaDCStack::compatibility_iterator node = sm_cocoaDCStack.GetFirst();
         if(node && (node->GetData() == this))
             return true;
         return CocoaUnwindStackAndTakeFocus();
index 3a0e7c3657ba2697880805b198a6453eed4ab387..528dcee4ffa52f3ff76940221be59183a3098058 100644 (file)
@@ -98,10 +98,10 @@ void wxDC::CocoaShutdownTextSystem()
 
 void wxDC::CocoaUnwindStackAndLoseFocus()
 {
-    wxCocoaDCStack::Node *ourNode=sm_cocoaDCStack.Find(this);
+    wxCocoaDCStack::compatibility_iterator ourNode=sm_cocoaDCStack.Find(this);
     if(ourNode)
     {
-        wxCocoaDCStack::Node *node=sm_cocoaDCStack.GetFirst();
+        wxCocoaDCStack::compatibility_iterator node=sm_cocoaDCStack.GetFirst();
         for(;node!=ourNode; node=sm_cocoaDCStack.GetFirst())
         {
             wxDC *dc = node->GetData();
@@ -111,18 +111,18 @@ void wxDC::CocoaUnwindStackAndLoseFocus()
             {
                 wxFAIL_MSG(wxT("Unable to unlock focus on higher-level DC!"));
             }
-            sm_cocoaDCStack.DeleteNode(node);
+            sm_cocoaDCStack.Erase(node);
         }
         wxASSERT(node==ourNode);
         wxASSERT(ourNode->GetData() == this);
         ourNode->GetData()->CocoaUnlockFocus();
-        sm_cocoaDCStack.DeleteNode(ourNode);
+        sm_cocoaDCStack.Erase(ourNode);
     }
 }
 
 bool wxDC::CocoaUnwindStackAndTakeFocus()
 {
-    wxCocoaDCStack::Node *node=sm_cocoaDCStack.GetFirst();
+    wxCocoaDCStack::compatibility_iterator node=sm_cocoaDCStack.GetFirst();
     for(;node;node = sm_cocoaDCStack.GetFirst())
     {
         wxDC *dc = node->GetData();
@@ -133,7 +133,7 @@ bool wxDC::CocoaUnwindStackAndTakeFocus()
         // If unable to unlockFocus (e.g. wxPaintDC) stop here
         if(!dc->CocoaUnlockFocus())
             break;
-        sm_cocoaDCStack.DeleteNode(node);
+        sm_cocoaDCStack.Erase(node);
     }
     return CocoaLockFocus();
 }