wxString and wxChar* access for file functions. Source cleaning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-12-21 17:35:42 +00:00
parent 7e49601492
commit f50a1c3d66
3 changed files with 10 additions and 11 deletions

View File

@@ -231,7 +231,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile)
wxBusyCursor b; // display a busy cursor
if(! ifile.IsEmpty())
if(! ifile.empty())
{
file = ifile;
if(! wxIsAbsolutePath(file))
@@ -254,7 +254,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile)
// set to be "de", then look in "/usr/local/myapp/help/de/"
// first and fall back to "/usr/local/myapp/help" if that
// doesn't exist.
if(wxGetLocale() && !wxGetLocale()->GetName().IsEmpty())
if(wxGetLocale() && !wxGetLocale()->GetName().empty())
{
wxString newfile;
newfile << WXEXTHELP_SEPARATOR << wxGetLocale()->GetName();
@@ -287,7 +287,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile)
m_MapList = new wxList;
m_NumOfEntries = 0;
FILE *input = wxFopen(mapFile,wxT("rt"));
FILE *input = wxFopen(mapFile.fn_str(),wxT("rt"));
if(! input)
return false;
do
@@ -401,7 +401,7 @@ wxExtHelpController::KeywordSearch(const wxString& k,
int idx = 0, j;
bool rc;
bool showAll = k.IsEmpty();
bool showAll = k.empty();
wxList::compatibility_iterator node = m_MapList->GetFirst();
wxExtHelpMapEntry *entry;
@@ -412,12 +412,12 @@ wxExtHelpController::KeywordSearch(const wxString& k,
{
entry = (wxExtHelpMapEntry *)node->GetData();
compB = entry->doc; compB.LowerCase();
if((showAll || compB.Contains(k)) && ! compB.IsEmpty())
if((showAll || compB.Contains(k)) && ! compB.empty())
{
urls[idx] = entry->url;
// doesn't work:
// choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR));
//if(choices[idx].IsEmpty()) // didn't contain the ';'
//if(choices[idx].empty()) // didn't contain the ';'
// choices[idx] = (**i).doc;
choices[idx] = wxEmptyString;
for(j=0;entry->doc.c_str()[j]