]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't copy potentially big arrays in generic wxDataViewCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Nov 2010 16:29:18 +0000 (16:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Nov 2010 16:29:18 +0000 (16:29 +0000)
Use reference to hold the array of nodes instead of copying it.

(Really) closes #12587.

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

src/generic/datavgen.cpp

index 38ed8b0e8dad9bb1bea02bd74fc75b81ffcc6331..4af5f4a2839bbf93c0180a4068a5528973c07274 100644 (file)
@@ -1893,8 +1893,8 @@ bool Walker( wxDataViewTreeNode * node, DoJob & func )
             ;
     }
 
-    wxDataViewTreeNodes nodes = node->GetNodes();
-    wxDataViewTreeLeaves leaves = node->GetChildren();
+    const wxDataViewTreeNodes& nodes = node->GetNodes();
+    const wxDataViewTreeLeaves& leaves = node->GetChildren();
 
     int len_nodes = nodes.GetCount();
     int len = leaves.GetCount();