don't use obsolete functions (mostly copystring() and Count()), remove their documentation (patch 1697956)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-11 00:23:19 +00:00
parent 325cf48f5a
commit b4a980f4f5
28 changed files with 143 additions and 238 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ void wxBookCtrlBase::DoSize()
// resize all pages to fit the new control size
const wxRect pageRect = GetPageRect();
const unsigned pagesCount = m_pages.Count();
const unsigned pagesCount = m_pages.GetCount();
for ( unsigned int i = 0; i < pagesCount; ++i )
{
wxWindow * const page = m_pages[i];
+1 -1
View File
@@ -526,7 +526,7 @@ wxString wxCmdLineParser::GetParam(size_t n) const
// Resets switches and options
void wxCmdLineParser::Reset()
{
for ( size_t i = 0; i < m_data->m_options.Count(); i++ )
for ( size_t i = 0; i < m_data->m_options.GetCount(); i++ )
{
wxCmdLineOption& opt = m_data->m_options[i];
opt.SetHasValue(false);
+41 -93
View File
File diff suppressed because it is too large Load Diff
+17 -17
View File
@@ -728,7 +728,7 @@ wxFileConfig::DoSetPath(const wxString& strPath, bool createMissingComponents)
// change current group
size_t n;
m_pCurrentGroup = m_pRootGroup;
for ( n = 0; n < aParts.Count(); n++ ) {
for ( n = 0; n < aParts.GetCount(); n++ ) {
wxFileConfigGroup *pNextGroup = m_pCurrentGroup->FindSubgroup(aParts[n]);
if ( pNextGroup == NULL )
{
@@ -743,7 +743,7 @@ wxFileConfig::DoSetPath(const wxString& strPath, bool createMissingComponents)
// recombine path parts in one variable
m_strPath.Empty();
for ( n = 0; n < aParts.Count(); n++ ) {
for ( n = 0; n < aParts.GetCount(); n++ ) {
m_strPath << wxCONFIG_PATH_SEPARATOR << aParts[n];
}
@@ -767,7 +767,7 @@ bool wxFileConfig::GetFirstGroup(wxString& str, long& lIndex) const
bool wxFileConfig::GetNextGroup (wxString& str, long& lIndex) const
{
if ( size_t(lIndex) < m_pCurrentGroup->Groups().Count() ) {
if ( size_t(lIndex) < m_pCurrentGroup->Groups().GetCount() ) {
str = m_pCurrentGroup->Groups()[(size_t)lIndex++]->Name();
return true;
}
@@ -783,7 +783,7 @@ bool wxFileConfig::GetFirstEntry(wxString& str, long& lIndex) const
bool wxFileConfig::GetNextEntry (wxString& str, long& lIndex) const
{
if ( size_t(lIndex) < m_pCurrentGroup->Entries().Count() ) {
if ( size_t(lIndex) < m_pCurrentGroup->Entries().GetCount() ) {
str = m_pCurrentGroup->Entries()[(size_t)lIndex++]->Name();
return true;
}
@@ -793,10 +793,10 @@ bool wxFileConfig::GetNextEntry (wxString& str, long& lIndex) const
size_t wxFileConfig::GetNumberOfEntries(bool bRecursive) const
{
size_t n = m_pCurrentGroup->Entries().Count();
size_t n = m_pCurrentGroup->Entries().GetCount();
if ( bRecursive ) {
wxFileConfigGroup *pOldCurrentGroup = m_pCurrentGroup;
size_t nSubgroups = m_pCurrentGroup->Groups().Count();
size_t nSubgroups = m_pCurrentGroup->Groups().GetCount();
for ( size_t nGroup = 0; nGroup < nSubgroups; nGroup++ ) {
CONST_CAST m_pCurrentGroup = m_pCurrentGroup->Groups()[nGroup];
n += GetNumberOfEntries(true);
@@ -809,10 +809,10 @@ size_t wxFileConfig::GetNumberOfEntries(bool bRecursive) const
size_t wxFileConfig::GetNumberOfGroups(bool bRecursive) const
{
size_t n = m_pCurrentGroup->Groups().Count();
size_t n = m_pCurrentGroup->Groups().GetCount();
if ( bRecursive ) {
wxFileConfigGroup *pOldCurrentGroup = m_pCurrentGroup;
size_t nSubgroups = m_pCurrentGroup->Groups().Count();
size_t nSubgroups = m_pCurrentGroup->Groups().GetCount();
for ( size_t nGroup = 0; nGroup < nSubgroups; nGroup++ ) {
CONST_CAST m_pCurrentGroup = m_pCurrentGroup->Groups()[nGroup];
n += GetNumberOfGroups(true);
@@ -1339,12 +1339,12 @@ wxFileConfigGroup::wxFileConfigGroup(wxFileConfigGroup *pParent,
wxFileConfigGroup::~wxFileConfigGroup()
{
// entries
size_t n, nCount = m_aEntries.Count();
size_t n, nCount = m_aEntries.GetCount();
for ( n = 0; n < nCount; n++ )
delete m_aEntries[n];
// subgroups
nCount = m_aSubgroups.Count();
nCount = m_aSubgroups.GetCount();
for ( n = 0; n < nCount; n++ )
delete m_aSubgroups[n];
}
@@ -1507,7 +1507,7 @@ void wxFileConfigGroup::UpdateGroupAndSubgroupsLines()
// also update all subgroups as they have this groups name in their lines
const size_t nCount = m_aSubgroups.Count();
const size_t nCount = m_aSubgroups.GetCount();
for ( size_t n = 0; n < nCount; n++ )
{
m_aSubgroups[n]->UpdateGroupAndSubgroupsLines();
@@ -1552,7 +1552,7 @@ wxFileConfigGroup::FindEntry(const wxChar *szName) const
{
size_t i,
lo = 0,
hi = m_aEntries.Count();
hi = m_aEntries.GetCount();
int res;
wxFileConfigEntry *pEntry;
@@ -1582,7 +1582,7 @@ wxFileConfigGroup::FindSubgroup(const wxChar *szName) const
{
size_t i,
lo = 0,
hi = m_aSubgroups.Count();
hi = m_aSubgroups.GetCount();
int res;
wxFileConfigGroup *pGroup;
@@ -1673,7 +1673,7 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup)
: wxEmptyString );
// delete all entries...
size_t nCount = pGroup->m_aEntries.Count();
size_t nCount = pGroup->m_aEntries.GetCount();
wxLogTrace(FILECONF_TRACE_MASK,
_T("Removing %lu entries"), (unsigned long)nCount );
@@ -1692,7 +1692,7 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup)
}
// ...and subgroups of this subgroup
nCount = pGroup->m_aSubgroups.Count();
nCount = pGroup->m_aSubgroups.GetCount();
wxLogTrace( FILECONF_TRACE_MASK,
_T("Removing %lu subgroups"), (unsigned long)nCount );
@@ -1726,7 +1726,7 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup)
// our last entry is being deleted, so find the last one which
// stays by going back until we find a subgroup or reach the
// group line
const size_t nSubgroups = m_aSubgroups.Count();
const size_t nSubgroups = m_aSubgroups.GetCount();
m_pLastGroup = NULL;
for ( wxFileConfigLineList *pl = pLine->Prev();
@@ -1781,7 +1781,7 @@ bool wxFileConfigGroup::DeleteEntry(const wxChar *szName)
// go back until we find another entry or reach the group's line
wxFileConfigEntry *pNewLast = NULL;
size_t n, nEntries = m_aEntries.Count();
size_t n, nEntries = m_aEntries.GetCount();
wxFileConfigLineList *pl;
for ( pl = pLine->Prev(); pl != m_pLine; pl = pl->Prev() ) {
// is it our subgroup?
+1 -1
View File
@@ -951,7 +951,7 @@ int wxFTP::GetFileSize(const wxString& fileName)
bool foundIt = false;
size_t i;
for ( i = 0; !foundIt && i < fileList.Count(); i++ )
for ( i = 0; !foundIt && i < fileList.GetCount(); i++ )
{
foundIt = fileList[i].Upper().Contains(fileName.Upper());
}
+1 -1
View File
@@ -218,7 +218,7 @@ wxTextFileType wxTextBuffer::GuessType() const
// we take MAX_LINES_SCAN in the beginning, middle and the end of buffer
#define MAX_LINES_SCAN (10)
size_t nCount = m_aLines.Count() / 3,
size_t nCount = m_aLines.GetCount() / 3,
nScan = nCount > 3*MAX_LINES_SCAN ? MAX_LINES_SCAN : nCount / 3;
#define AnalyseLine(n) \
-1
View File
@@ -894,7 +894,6 @@ wxChar *wxStripMenuCodes(const wxChar *in, wxChar *out)
}
else
{
// MYcopystring - for easier search...
out = new wxChar[s.length() + 1];
wxStrcpy(out, s.c_str());
}
+2 -2
View File
@@ -883,7 +883,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
// Add the sorted dirs
size_t i;
for (i = 0; i < dirs.Count(); i++)
for (i = 0; i < dirs.GetCount(); i++)
{
eachFilename = dirs[i];
path = dirName;
@@ -912,7 +912,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
// Add the sorted filenames
if ((GetWindowStyle() & wxDIRCTRL_DIR_ONLY) == 0)
{
for (i = 0; i < filenames.Count(); i++)
for (i = 0; i < filenames.GetCount(); i++)
{
eachFilename = filenames[i];
path = dirName;
+2 -2
View File
@@ -2717,7 +2717,7 @@ int wxGridCellAttrData::FindIndex(int row, int col) const
wxGridRowOrColAttrData::~wxGridRowOrColAttrData()
{
size_t count = m_attrs.Count();
size_t count = m_attrs.GetCount();
for ( size_t n = 0; n < count; n++ )
{
m_attrs[n]->DecRef();
@@ -2958,7 +2958,7 @@ void wxGridCellAttrProvider::UpdateAttrCols( size_t pos, int numCols )
wxGridTypeRegistry::~wxGridTypeRegistry()
{
size_t count = m_typeinfo.Count();
size_t count = m_typeinfo.GetCount();
for ( size_t i = 0; i < count; i++ )
delete m_typeinfo[i];
}
+1 -1
View File
@@ -290,7 +290,7 @@ void wxLogGui::Flush()
wxString title;
title.Printf(titleFormat, appName.c_str());
size_t nMsgCount = m_aMessages.Count();
size_t nMsgCount = m_aMessages.GetCount();
// avoid showing other log dialogs until we're done with the dialog we're
// showing right now: nested modal dialogs make for really bad UI!
+15 -15
View File
@@ -548,7 +548,7 @@ wxGenericTreeItem::~wxGenericTreeItem()
void wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl *tree)
{
size_t count = m_children.Count();
size_t count = m_children.GetCount();
for ( size_t n = 0; n < count; n++ )
{
wxGenericTreeItem *child = m_children[n];
@@ -570,7 +570,7 @@ void wxGenericTreeItem::SetText( const wxString &text )
size_t wxGenericTreeItem::GetChildrenCount(bool recursively) const
{
size_t count = m_children.Count();
size_t count = m_children.GetCount();
if ( !recursively )
return count;
@@ -593,7 +593,7 @@ void wxGenericTreeItem::GetSize( int &x, int &y,
if (IsExpanded())
{
size_t count = m_children.Count();
size_t count = m_children.GetCount();
for ( size_t n = 0; n < count; ++n )
{
m_children[n]->GetSize( x, y, theButton );
@@ -668,7 +668,7 @@ wxGenericTreeItem *wxGenericTreeItem::HitTest(const wxPoint& point,
}
// evaluate children
size_t count = m_children.Count();
size_t count = m_children.GetCount();
for ( size_t n = 0; n < count; n++ )
{
wxGenericTreeItem *res = m_children[n]->HitTest( point,
@@ -1203,7 +1203,7 @@ wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
// it's ok to cast cookie to size_t, we never have indices big enough to
// overflow "void *"
size_t *pIndex = (size_t *)&cookie;
if ( *pIndex < children.Count() )
if ( *pIndex < children.GetCount() )
{
return children.Item((*pIndex)++);
}
@@ -1239,7 +1239,7 @@ wxTreeItemId wxGenericTreeCtrl::GetNextSibling(const wxTreeItemId& item) const
wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent?
size_t n = (size_t)(index + 1);
return n == siblings.Count() ? wxTreeItemId() : wxTreeItemId(siblings[n]);
return n == siblings.GetCount() ? wxTreeItemId() : wxTreeItemId(siblings[n]);
}
wxTreeItemId wxGenericTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const
@@ -1636,7 +1636,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
#if 0 // TODO why should items be collapsed recursively?
wxArrayGenericTreeItems& children = item->GetChildren();
size_t count = children.Count();
size_t count = children.GetCount();
for ( size_t n = 0; n < count; n++ )
{
Collapse(children[n]);
@@ -1690,7 +1690,7 @@ void wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item)
if (item->HasChildren())
{
wxArrayGenericTreeItems& children = item->GetChildren();
size_t count = children.Count();
size_t count = children.GetCount();
for ( size_t n = 0; n < count; ++n )
{
UnselectAllChildren(children[n]);
@@ -1726,7 +1726,7 @@ bool wxGenericTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTr
int index = children.Index(crt_item);
wxASSERT( index != wxNOT_FOUND ); // I'm not a child of my parent?
size_t count = children.Count();
size_t count = children.GetCount();
for (size_t n=(size_t)(index+1); n<count; ++n)
{
if (TagAllChildrenUntilLast(children[n], last_item, select)) return true;
@@ -1746,7 +1746,7 @@ bool wxGenericTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxG
if (crt_item->HasChildren())
{
wxArrayGenericTreeItems& children = crt_item->GetChildren();
size_t count = children.Count();
size_t count = children.GetCount();
for ( size_t n = 0; n < count; ++n )
{
if (TagAllChildrenUntilLast(children[n], last_item, select))
@@ -1908,7 +1908,7 @@ size_t wxGenericTreeCtrl::GetSelections(wxArrayTreeItemIds &array) const
}
//else: the tree is empty, so no selections
return array.Count();
return array.GetCount();
}
void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item)
@@ -2019,7 +2019,7 @@ void wxGenericTreeCtrl::SortChildren(const wxTreeItemId& itemId)
wxT("wxGenericTreeCtrl::SortChildren is not reentrant") );
wxArrayGenericTreeItems& children = item->GetChildren();
if ( children.Count() > 1 )
if ( children.GetCount() > 1 )
{
m_dirty = true;
@@ -2300,7 +2300,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
// always expand hidden root
int origY = y;
wxArrayGenericTreeItems& children = item->GetChildren();
int count = children.Count();
int count = children.GetCount();
if (count > 0)
{
int n = 0, oldY;
@@ -2448,7 +2448,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
if (item->IsExpanded())
{
wxArrayGenericTreeItems& children = item->GetChildren();
int count = children.Count();
int count = children.GetCount();
if (count > 0)
{
int n = 0, oldY;
@@ -3438,7 +3438,7 @@ void wxGenericTreeCtrl::CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int l
Recurse:
wxArrayGenericTreeItems& children = item->GetChildren();
size_t n, count = children.Count();
size_t n, count = children.GetCount();
++level;
for (n = 0; n < count; ++n )
CalculateLevel( children[n], dc, level, y ); // recurse
+6 -6
View File
@@ -264,19 +264,19 @@ bool wxHtmlPrintout::OnPrintPage(int page)
void wxHtmlPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo)
{
*minPage = 1;
if ( m_NumPages >= (signed)m_PageBreaks.Count()-1)
if ( m_NumPages >= (signed)m_PageBreaks.GetCount()-1)
*maxPage = m_NumPages;
else
*maxPage = (signed)m_PageBreaks.Count()-1;
*maxPage = (signed)m_PageBreaks.GetCount()-1;
*selPageFrom = 1;
*selPageTo = (signed)m_PageBreaks.Count()-1;
*selPageTo = (signed)m_PageBreaks.GetCount()-1;
}
bool wxHtmlPrintout::HasPage(int pageNum)
{
return pageNum > 0 && (unsigned)pageNum < m_PageBreaks.Count();
return pageNum > 0 && (unsigned)pageNum < m_PageBreaks.GetCount();
}
@@ -374,7 +374,7 @@ void wxHtmlPrintout::CountPages()
m_PageBreaks,
pos, true, INT_MAX);
m_PageBreaks.Add( pos);
if( m_PageBreaks.Count() > wxHTML_PRINT_MAX_PAGES)
if( m_PageBreaks.GetCount() > wxHTML_PRINT_MAX_PAGES)
{
wxMessageBox( _("HTML pagination algorithm generated more than the allowed maximum number of pages and it can't continue any longer!"),
_("Warning"), wxCANCEL | wxICON_ERROR );
@@ -440,7 +440,7 @@ wxString wxHtmlPrintout::TranslateHeader(const wxString& instr, int page)
num.Printf(wxT("%i"), page);
r.Replace(wxT("@PAGENUM@"), num);
num.Printf(wxT("%lu"), (unsigned long)(m_PageBreaks.Count() - 1));
num.Printf(wxT("%lu"), (unsigned long)(m_PageBreaks.GetCount() - 1));
r.Replace(wxT("@PAGESCNT@"), num);
const wxDateTime now = wxDateTime::Now();
+1 -1
View File
@@ -100,7 +100,7 @@ bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, wxArrayInt& known_page
// vertical position. Otherwise we'd be setting a pagebreak above
// the current cell, which is incorrect, or duplicating a
// pagebreak that has already been set.
if( known_pagebreaks.Count() == 0 || *pagebreak <= m_PosY)
if( known_pagebreaks.GetCount() == 0 || *pagebreak <= m_PosY)
{
return false;
}
-2
View File
@@ -126,8 +126,6 @@ wxChar *wxLoadUserResource(const wxString& resourceName, const wxString& resourc
wxStrncpy(s,theText,len);
s[len]=0;
// wxChar *s = copystring(theText);
// Obsolete in WIN32
#ifndef __WIN32__
UnlockResource(hData);
+18 -18
View File
@@ -1083,7 +1083,7 @@ static wxString ReadPathFromKDEConfig(const wxString& request)
wxString str;
wxArrayString output;
if(wxExecute(wxT("kde-config --path ")+request, output) == 0 &&
output.Count() > 0)
output.GetCount() > 0)
str = output.Item(0);
return str;
}
@@ -1111,7 +1111,7 @@ static wxString GetKDEThemeInFile(const wxFileName& filename)
static wxString GetKDETheme(const wxArrayString& basedirs)
{
wxString theme;
for(size_t i = 0; i < basedirs.Count(); i++) {
for(size_t i = 0; i < basedirs.GetCount(); i++) {
wxFileName filename(basedirs.Item(i), wxEmptyString);
filename.AppendDir( wxT("share") );
filename.AppendDir( wxT("config") );
@@ -1122,7 +1122,7 @@ static wxString GetKDETheme(const wxArrayString& basedirs)
}
// If $KDEDIRS and $KDEDIR were set, we try nothing more. Otherwise, we
// try to get the configuration file with 'kde-config'.
if(basedirs.Count() > 1)
if(basedirs.GetCount() > 1)
return theme;
wxString paths = ReadPathFromKDEConfig(wxT("config"));
if(! paths.IsEmpty()) {
@@ -1145,7 +1145,7 @@ static void GetKDEIconDirs(const wxArrayString& basedirs,
if(theme.IsEmpty())
theme = wxT("default.kde");
for(size_t i = 0; i < basedirs.Count(); i++) {
for(size_t i = 0; i < basedirs.GetCount(); i++) {
wxFileName dirname(basedirs.Item(i), wxEmptyString);
dirname.AppendDir( wxT("share") );
dirname.AppendDir( wxT("icons") );
@@ -1157,7 +1157,7 @@ static void GetKDEIconDirs(const wxArrayString& basedirs,
}
// If $KDEDIRS and $KDEDIR were not set, use 'kde-config'
if(basedirs.Count() > 1)
if(basedirs.GetCount() > 1)
return;
wxString paths = ReadPathFromKDEConfig(wxT("icon"));
if(! paths.IsEmpty()) {
@@ -1178,7 +1178,7 @@ static void GetKDEIconDirs(const wxArrayString& basedirs,
static void GetKDEMimeDirs(const wxArrayString& basedirs,
wxArrayString& mimedirs)
{
for(size_t i = 0; i < basedirs.Count(); i++) {
for(size_t i = 0; i < basedirs.GetCount(); i++) {
wxFileName dirname(basedirs.Item(i), wxEmptyString);
dirname.AppendDir( wxT("share") );
dirname.AppendDir( wxT("mimelnk") );
@@ -1187,7 +1187,7 @@ static void GetKDEMimeDirs(const wxArrayString& basedirs,
}
// If $KDEDIRS and $KDEDIR were not set, use 'kde-config'
if(basedirs.Count() > 1)
if(basedirs.GetCount() > 1)
return;
wxString paths = ReadPathFromKDEConfig(wxT("mime"));
if(! paths.IsEmpty()) {
@@ -1206,7 +1206,7 @@ static void GetKDEMimeDirs(const wxArrayString& basedirs,
static void GetKDEAppsDirs(const wxArrayString& basedirs,
wxArrayString& appsdirs)
{
for(size_t i = 0; i < basedirs.Count(); i++) {
for(size_t i = 0; i < basedirs.GetCount(); i++) {
wxFileName dirname(basedirs.Item(i), wxEmptyString);
dirname.AppendDir( wxT("share") );
dirname.AppendDir( wxT("applnk") );
@@ -1215,7 +1215,7 @@ static void GetKDEAppsDirs(const wxArrayString& basedirs,
}
// If $KDEDIRS and $KDEDIR were not set, use 'kde-config'
if(basedirs.Count() > 1)
if(basedirs.GetCount() > 1)
return;
wxString paths = ReadPathFromKDEConfig(wxT("apps"));
if(! paths.IsEmpty()) {
@@ -2101,10 +2101,10 @@ int wxMimeTypesManagerImpl::AddToMimeData(const wxString& strType,
}
// check data integrity
wxASSERT( m_aTypes.Count() == m_aEntries.Count() &&
m_aTypes.Count() == m_aExtensions.Count() &&
m_aTypes.Count() == m_aIcons.Count() &&
m_aTypes.Count() == m_aDescriptions.Count() );
wxASSERT( m_aTypes.GetCount() == m_aEntries.GetCount() &&
m_aTypes.GetCount() == m_aExtensions.GetCount() &&
m_aTypes.GetCount() == m_aIcons.GetCount() &&
m_aTypes.GetCount() == m_aDescriptions.GetCount() );
return nIndex;
}
@@ -2162,7 +2162,7 @@ wxFileType * wxMimeTypesManagerImpl::GetFileTypeFromMimeType(const wxString& mim
index = wxNOT_FOUND;
wxString strCategory = mimetype.BeforeFirst(wxT('/'));
size_t nCount = m_aTypes.Count();
size_t nCount = m_aTypes.GetCount();
for ( size_t n = 0; n < nCount; n++ )
{
if ( (m_aTypes[n].BeforeFirst(wxT('/')) == strCategory ) &&
@@ -2871,10 +2871,10 @@ bool wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
}
}
// check data integrity
wxASSERT( m_aTypes.Count() == m_aEntries.Count() &&
m_aTypes.Count() == m_aExtensions.Count() &&
m_aTypes.Count() == m_aIcons.Count() &&
m_aTypes.Count() == m_aDescriptions.Count() );
wxASSERT( m_aTypes.GetCount() == m_aEntries.GetCount() &&
m_aTypes.GetCount() == m_aExtensions.GetCount() &&
m_aTypes.GetCount() == m_aIcons.GetCount() &&
m_aTypes.GetCount() == m_aDescriptions.GetCount() );
return true;
}
+3 -3
View File
@@ -100,7 +100,7 @@ wxObject *wxTreebookXmlHandler::DoCreateResource()
size_t depth = GetLong( wxT("depth") );
if( depth <= m_treeContext.Count() )
if( depth <= m_treeContext.GetCount() )
{
// first prepare the icon
int imgIndex = wxNOT_FOUND;
@@ -117,8 +117,8 @@ wxObject *wxTreebookXmlHandler::DoCreateResource()
}
// then add the page to the corresponding parent
if( depth < m_treeContext.Count() )
m_treeContext.RemoveAt(depth, m_treeContext.Count() - depth );
if( depth < m_treeContext.GetCount() )
m_treeContext.RemoveAt(depth, m_treeContext.GetCount() - depth );
if( depth == 0)
{
m_tbk->AddPage(wnd,