X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd12a395baa3a4c29fb857f8d30c455bf361a5b1..61c213fe224da24ce33c9187263e75a17ca83a04:/samples/richedit/wxlparser.cpp diff --git a/samples/richedit/wxlparser.cpp b/samples/richedit/wxlparser.cpp index 75d9f981b9..c5705745a4 100644 --- a/samples/richedit/wxlparser.cpp +++ b/samples/richedit/wxlparser.cpp @@ -45,6 +45,7 @@ void wxLayoutImportText(wxLayoutList *list, wxString const &str) // VZ: I still don't like it... the string data may be shared... wxChar * cptr = (wxChar *)str.c_str(); // const_cast const wxChar * begin = cptr; + wxUnusedVar(begin); wxChar backup; for(;;) @@ -165,7 +166,7 @@ wxLayoutExportStatus::wxLayoutExportStatus(wxLayoutList *list) m_si = list->GetDefaultStyleInfo(); m_line = list->GetFirstLine(); m_iterator = m_line->GetFirstObject(); - m_FirstTime = TRUE; + m_FirstTime = true; } @@ -179,10 +180,11 @@ wxLayoutExportStatus::wxLayoutExportStatus(wxLayoutList *list) wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status, int mode, int flags) { + wxLayoutObjectList::iterator nulled(NULL); wxASSERT(status); wxLayoutExportObject * exp; - if(status->m_iterator == NULLIT) // end of line + if(status->m_iterator == nulled) // end of line { if(!status->m_line || status->m_line->GetNextLine() == NULL) // reached end of list @@ -190,7 +192,7 @@ wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status, } exp = new wxLayoutExportObject(); wxLayoutObjectType type; - if(status->m_iterator != NULLIT) + if(status->m_iterator != nulled) { type = (** status->m_iterator).GetType(); if( mode == WXLO_EXPORT_AS_OBJECTS || ! WXLO_IS_TEXT(type)) // simple case @@ -202,7 +204,7 @@ wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status, } } else - { // iterator == NULLIT + { // iterator == nulled if(mode == WXLO_EXPORT_AS_OBJECTS) { exp->type = WXLO_EXPORT_EMPTYLINE; @@ -215,12 +217,13 @@ wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status, else type = WXLO_TYPE_TEXT; } + wxUnusedVar(type); wxString *str = new wxString(); // text must be concatenated for(;;) { - while(status->m_iterator == NULLIT) + while(status->m_iterator == nulled) { if(mode & WXLO_EXPORT_AS_HTML) *str += _T("
"); @@ -250,7 +253,7 @@ wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status, *str += wxLayoutExportCmdAsHTML( *(wxLayoutObjectCmd const *)*status->m_iterator, & status->m_si, status->m_FirstTime); - status->m_FirstTime = FALSE; + status->m_FirstTime = false; break; default: // ignore icons ;