From: Vadim Zeitlin Date: Wed, 3 Nov 2010 16:29:18 +0000 (+0000) Subject: Don't copy potentially big arrays in generic wxDataViewCtrl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5ca9771ff389ba5981d12ee7ac8b7f23edc6118a Don't copy potentially big arrays in generic wxDataViewCtrl. 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 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 38ed8b0e8d..4af5f4a283 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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();