]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/listctrl/listtest.cpp
Warning fix.
[wxWidgets.git] / samples / listctrl / listtest.cpp
index 59ff8c0a97bb415872a9431b5e22d3b184baae3d..11f2dab732ff2fb3a9421e4ce4c12d893996c1ac 100644 (file)
@@ -656,10 +656,12 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
 {
     wxStopWatch sw;
 
+    size_t itemCount = m_listCtrl->GetItemCount();
+
     m_listCtrl->DeleteAllItems();
 
     m_logWindow->WriteText(wxString::Format(_T("Deleting %d items took %ld ms\n"),
-                                            m_listCtrl->GetItemCount(),
+                                            itemCount,
                                             sw.Time()));
 }