]> git.saurik.com Git - wxWidgets.git/commitdiff
(blind) fix for VC6 build
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Mar 2009 13:58:12 +0000 (13:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Mar 2009 13:58:12 +0000 (13:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dataview/mymodels.cpp

index 396850cf41c04af5fac1bcaacfdf6596c747d381..451c99f0354cd8c1bdf900cab8dba1d30abbfe50 100644 (file)
@@ -42,18 +42,18 @@ MyMusicTreeModel::MyMusicTreeModel()
 \r
     // setup pop music\r
     m_pop = new MyMusicTreeModelNode( m_root, wxT("Pop music") );\r
-    m_pop->Append( \r
+    m_pop->Append(\r
         new MyMusicTreeModelNode( m_pop, wxT("You are not alone"), wxT("Michael Jackson"), 1995 ) );\r
-    m_pop->Append( \r
+    m_pop->Append(\r
         new MyMusicTreeModelNode( m_pop, wxT("Take a bow"), wxT("Madonna"), 1994 ) );\r
     m_root->Append( m_pop );\r
 \r
     // setup classical music\r
     m_classical = new MyMusicTreeModelNode( m_root, wxT("Classical music") );\r
-    m_ninth = new MyMusicTreeModelNode( m_classical, wxT("Ninth symphony"), \r
+    m_ninth = new MyMusicTreeModelNode( m_classical, wxT("Ninth symphony"),\r
                                         wxT("Ludwig van Beethoven"), 1824 );\r
     m_classical->Append( m_ninth );\r
-    m_classical->Append( new MyMusicTreeModelNode( m_classical, wxT("German Requiem"), \r
+    m_classical->Append( new MyMusicTreeModelNode( m_classical, wxT("German Requiem"),\r
                                                    wxT("Johannes Brahms"), 1868 ) );\r
     m_root->Append( m_classical );\r
 \r
@@ -78,7 +78,7 @@ int MyMusicTreeModel::GetYear( const wxDataViewItem &item ) const
     return node->m_year;\r
 }\r
 \r
-void MyMusicTreeModel::AddToClassical( const wxString &title, const wxString &artist, \r
+void MyMusicTreeModel::AddToClassical( const wxString &title, const wxString &artist,\r
                                        unsigned int year )\r
 {\r
     if (!m_classical)\r
@@ -115,7 +115,7 @@ void MyMusicTreeModel::Delete( const wxDataViewItem &item )
     {\r
         wxASSERT(node == m_root);\r
 \r
-        // don't make the control completely empty: \r
+        // don't make the control completely empty:\r
         wxLogError("Cannot remove the root item!");\r
         return;\r
     }\r
@@ -176,16 +176,16 @@ void MyMusicTreeModel::GetValue( wxVariant &variant,
     switch (col)\r
     {\r
     case 0:\r
-        variant = node->m_title; \r
+        variant = node->m_title;\r
         break;\r
-    case 1: \r
-        variant = node->m_artist; \r
+    case 1:\r
+        variant = node->m_artist;\r
         break;\r
-    case 2: \r
-        variant = (long) node->m_year; \r
+    case 2:\r
+        variant = (long) node->m_year;\r
         break;\r
-    case 3: \r
-        variant = node->m_quality; \r
+    case 3:\r
+        variant = node->m_quality;\r
         break;\r
     case 4:\r
         // wxMac doesn't conceal the popularity progress renderer, return 0 for containers\r
@@ -215,20 +215,20 @@ bool MyMusicTreeModel::SetValue( const wxVariant &variant,
     MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) item.GetID();\r
     switch (col)\r
     {\r
-        case 0: \r
-            node->m_title = variant.GetString(); \r
+        case 0:\r
+            node->m_title = variant.GetString();\r
             return true;\r
-        case 1: \r
-            node->m_artist = variant.GetString(); \r
+        case 1:\r
+            node->m_artist = variant.GetString();\r
             return true;\r
-        case 2: \r
-            node->m_year = variant.GetLong(); \r
+        case 2:\r
+            node->m_year = variant.GetLong();\r
             return true;\r
-        case 3: \r
-            node->m_quality = variant.GetString(); \r
+        case 3:\r
+            node->m_quality = variant.GetString();\r
             return true;\r
 \r
-        default: \r
+        default:\r
             wxLogError( wxT("MyMusicTreeModel::SetValue: wrong column") );\r
     }\r
     return false;\r
@@ -260,7 +260,7 @@ bool MyMusicTreeModel::IsContainer( const wxDataViewItem &item ) const
     return node->IsContainer();\r
 }\r
 \r
-unsigned int MyMusicTreeModel::GetChildren( const wxDataViewItem &parent, \r
+unsigned int MyMusicTreeModel::GetChildren( const wxDataViewItem &parent,\r
                                             wxDataViewItemArray &array ) const\r
 {\r
     MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) parent.GetID();\r
@@ -319,7 +319,7 @@ MyListModel::MyListModel() :
     m_virtualItems = INITIAL_NUMBER_OF_ITEMS;\r
 \r
     // the first 100 items are really stored in this model;\r
-    // all the others are synthetized on request \r
+    // all the others are synthetized on request\r
     for (unsigned int i = 0; i < 100; i++)\r
     {\r
         wxString str;\r
@@ -349,8 +349,9 @@ void MyListModel::DeleteItem( const wxDataViewItem &item )
 \r
 void MyListModel::DeleteItems( const wxDataViewItemArray &items )\r
 {\r
+    unsigned i;\r
     wxArrayInt rows;\r
-    for (unsigned int i = 0; i < items.GetCount(); i++)\r
+    for (int i = 0; i < items.GetCount(); i++)\r
     {\r
         unsigned int row = GetRow( items[i] );\r
         if (row < m_array.GetCount())\r
@@ -369,7 +370,7 @@ void MyListModel::DeleteItems( const wxDataViewItemArray &items )
     // row will be deleted first. Otherwise the\r
     // remaining indeces would all be wrong.\r
     rows.Sort( my_sort_reverse );\r
-    for (unsigned int i = 0; i < rows.GetCount(); i++)\r
+    for (i = 0; i < rows.GetCount(); i++)\r
         m_array.RemoveAt( rows[i] );\r
 \r
     // This is just to test if wxDataViewCtrl can\r
@@ -394,12 +395,12 @@ void MyListModel::GetValueByRow( wxVariant &variant,
             variant = wxString::Format( wxT("virtual row %d"), row );\r
         else\r
             variant = m_array[ row ];\r
-    } \r
+    }\r
     else if (col==1)\r
     {\r
         wxDataViewIconText data( wxT("test"), m_icon[ row%2 ] );\r
         variant << data;\r
-    } \r
+    }\r
     else if (col==2)\r
     {\r
         if (row >= m_array.GetCount())\r
@@ -409,7 +410,7 @@ void MyListModel::GetValueByRow( wxVariant &variant,
     }\r
 }\r
 \r
-bool MyListModel::GetAttrByRow( unsigned int row, unsigned int col, \r
+bool MyListModel::GetAttrByRow( unsigned int row, unsigned int col,\r
                                 wxDataViewItemAttr &attr )\r
 {\r
     if (col != 2)\r