diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 54d745f6cf..bc4ed646ef 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -6412,7 +6412,7 @@ wxAccStatus wxDataViewCtrlAccessible::GetHelpText(int childId, wxString* helpTex } else { - *helpText = wxEmptyString; + helpText->clear(); } } return wxACC_OK; diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 2080009ac1..84ceb8b97d 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -465,7 +465,7 @@ void wxGenericDirCtrl::Init() { m_showHidden = false; m_currentFilter = 0; - m_currentFilterStr = wxEmptyString; // Default: any file + m_currentFilterStr.clear(); // Default: any file m_treeCtrl = NULL; m_filterListCtrl = NULL; } diff --git a/src/generic/filectrlg.cpp b/src/generic/filectrlg.cpp index 49578fa811..711397fe2d 100644 --- a/src/generic/filectrlg.cpp +++ b/src/generic/filectrlg.cpp @@ -674,7 +674,7 @@ void wxFileListCtrl::GoToParentDir() if (!m_dirName.empty()) { if (m_dirName.Last() == wxT('.')) - m_dirName = wxEmptyString; + m_dirName.clear(); } #elif defined(__UNIX__) if (m_dirName.empty()) @@ -927,7 +927,7 @@ bool wxGenericFileCtrl::Create( wxWindow *parent, if ( ( len > 1 ) && ( wxEndsWithPathSeparator( m_dir ) ) ) m_dir.Remove( len - 1, 1 ); - m_filterExtension = wxEmptyString; + m_filterExtension.clear(); // layout diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index db1557bace..48c746a3a9 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -187,7 +187,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent, if ((len > 1) && (wxEndsWithPathSeparator(m_dir))) m_dir.Remove( len-1, 1 ); - m_filterExtension = wxEmptyString; + m_filterExtension.clear(); // layout diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 083d1e0d34..5a8831f792 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1311,7 +1311,7 @@ void wxGridStringTable::Clear() { for ( col = 0; col < numCols; col++ ) { - m_data[row][col] = wxEmptyString; + m_data[row][col].clear(); } } } diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index f4e769eb27..a8070ef340 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -422,7 +422,7 @@ bool wxExtHelpController::KeywordSearch(const wxString& k, // choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR)); //if (choices[idx].empty()) // didn't contain the ';' // choices[idx] = (**i).doc; - choices[idx] = wxEmptyString; + choices[idx].clear(); for (int j=0; ; j++) { wxChar targetChar = entry->doc.c_str()[j]; diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index d77833bb16..4f144bb751 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -68,7 +68,7 @@ void wxVListBoxComboPopup::Init() m_value = -1; m_itemHover = -1; m_clientDataItemsType = wxClientData_None; - m_partialCompletionString = wxEmptyString; + m_partialCompletionString.clear(); } bool wxVListBoxComboPopup::Create(wxWindow* parent) @@ -224,7 +224,7 @@ void wxVListBoxComboPopup::DismissWithEvent() if ( selection != wxNOT_FOUND ) m_stringValue = m_strings[selection]; else - m_stringValue = wxEmptyString; + m_stringValue.clear(); if ( m_stringValue != m_combo->GetValue() ) m_combo->SetValueByUser(m_stringValue); @@ -388,7 +388,7 @@ bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar keychar // stop partial completion void wxVListBoxComboPopup::StopPartialCompletion() { - m_partialCompletionString = wxEmptyString; + m_partialCompletionString.clear(); #if wxUSE_TIMER m_partialCompletionTimer.Stop(); #endif // wxUSE_TIMER @@ -685,7 +685,7 @@ void wxVListBoxComboPopup::SetSelection( int item ) if ( item >= 0 ) m_stringValue = m_strings[item]; else - m_stringValue = wxEmptyString; + m_stringValue.clear(); if ( IsCreated() ) wxVListBox::SetSelection(item); diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 779e811200..d464b4e4ac 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -714,7 +714,8 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") { m_Table = NULL; m_enclosingContainer = NULL; - m_tAlign = m_rAlign = wxEmptyString; + m_tAlign.clear(); + m_rAlign.clear(); } diff --git a/src/osx/carbon/fontdlg.cpp b/src/osx/carbon/fontdlg.cpp index 0ed0a2651d..a6dadb57ef 100644 --- a/src/osx/carbon/fontdlg.cpp +++ b/src/osx/carbon/fontdlg.cpp @@ -587,7 +587,7 @@ void wxFontDialog::ChangeFont() wxFontFamily family = FontFamilyStringToInt(facename); if (family != wxFONTFAMILY_DEFAULT) - facename = wxEmptyString; + facename.clear(); m_dialogFont = wxFontInfo(size) .Family(family).FaceName(facename) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index abaf02276d..9428747a3c 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -3453,7 +3453,7 @@ void wxDataViewColumn::SetBitmap(const wxBitmap& bitmap) { // bitmaps and titles cannot exist at the same time - if the bitmap is set // the title is removed: - m_title = wxEmptyString; + m_title.clear(); wxDataViewColumnBase::SetBitmap(bitmap); [[m_NativeDataPtr->GetNativeColumnPtr() headerCell] setImage:bitmap.GetNSImage()]; } diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index c6a4dc9139..f9ae000edb 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -113,7 +113,7 @@ int wxDirDialog::ShowModal() wxCFStringRef dir( m_path ); - m_path = wxEmptyString; + m_path.clear(); int returnCode = -1; diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 634df40c0c..d6635e6137 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -494,7 +494,7 @@ int wxFileDialog::ShowModal() wxCFStringRef dir( m_dir ); wxCFStringRef file( m_fileName ); - m_path = wxEmptyString; + m_path.clear(); m_fileNames.Clear(); m_paths.Clear(); diff --git a/src/osx/core/mimetype.cpp b/src/osx/core/mimetype.cpp index dce5997464..afc4562694 100644 --- a/src/osx/core/mimetype.cpp +++ b/src/osx/core/mimetype.cpp @@ -540,7 +540,7 @@ bool wxMimeTypesManagerImpl::GetMimeType(const wxString& uti, wxString *mimeType if( itr == m_utiMap.end() || itr->second.mimeTypes.GetCount() < 1 ) { - *mimeType = wxEmptyString; + mimeType->clear(); return false; } @@ -582,7 +582,7 @@ bool wxMimeTypesManagerImpl::GetDescription(const wxString& uti, wxString *desc) if( itr == m_utiMap.end() || itr->second.description.empty() ) { - *desc = wxEmptyString; + desc->clear(); return false; } diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 70d37ef6d5..0b6c1e2843 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -2815,7 +2815,7 @@ wxRichTextRange wxRichTextParagraphLayoutBox::AddParagraphs(const wxString& text AppendChild(para); lastPara = para; - line = wxEmptyString; + line.clear(); } } else @@ -4757,7 +4757,7 @@ bool wxRichTextParagraphLayoutBox::FindNextParagraphNumber(wxRichTextParagraph* text = text.Mid(0, text.Length() - pos - 1); } else - text = wxEmptyString; + text.clear(); if (!text.IsEmpty()) text += wxT("."); text += wxString::Format(wxT("%d"), nextNumber); @@ -6297,7 +6297,7 @@ wxRichTextObject* wxRichTextParagraph::FindObjectAtPosition(long position) /// The resulting string may be shorter than the range given. bool wxRichTextParagraph::GetContiguousPlainText(wxString& text, const wxRichTextRange& range, bool fromStart) { - text = wxEmptyString; + text.clear(); if (fromStart) { @@ -13623,7 +13623,7 @@ void wxTextBoxAttr::Reset() m_whitespaceMode = wxTEXT_BOX_ATTR_WHITESPACE_NONE; m_collapseMode = wxTEXT_BOX_ATTR_COLLAPSE_NONE; m_verticalAlignment = wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_NONE; - m_boxStyleName = wxEmptyString; + m_boxStyleName.clear(); m_margins.Reset(); m_padding.Reset(); diff --git a/src/richtext/richtextprint.cpp b/src/richtext/richtextprint.cpp index f89791b301..601f9d6862 100644 --- a/src/richtext/richtextprint.cpp +++ b/src/richtext/richtextprint.cpp @@ -744,7 +744,7 @@ void wxRichTextHeaderFooterData::Clear() { int i; for (i = 0; i < 12; i++) - m_text[i] = wxEmptyString; + m_text[i].clear(); } #endif // wxUSE_RICHTEXT & wxUSE_PRINTING_ARCHITECTURE diff --git a/src/richtext/richtextsymboldlg.cpp b/src/richtext/richtextsymboldlg.cpp index 4fd387243f..57512df37a 100644 --- a/src/richtext/richtextsymboldlg.cpp +++ b/src/richtext/richtextsymboldlg.cpp @@ -605,7 +605,7 @@ void wxSymbolPickerDialog::ShowAtSubset() void wxSymbolPickerDialog::OnFontCtrlSelected( wxCommandEvent& WXUNUSED(event) ) { if (m_fontCtrl->GetSelection() == 0) - m_fontName = wxEmptyString; + m_fontName.clear(); else m_fontName = m_fontCtrl->GetStringSelection(); @@ -619,13 +619,9 @@ void wxSymbolPickerDialog::OnSymbolSelected( wxCommandEvent& event ) return; int sel = event.GetSelection(); - if (sel == wxNOT_FOUND) - m_symbol = wxEmptyString; - else - { - m_symbol = wxEmptyString; + m_symbol.clear(); + if (sel != wxNOT_FOUND) m_symbol << (wxChar) sel; - } #if defined(__UNICODE__) if (sel != -1 && m_fromUnicode) diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index d470d693e6..1e49dfa71a 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -1083,7 +1083,7 @@ void wxRichTextXMLHelper::Clear() m_convMem = NULL; m_deleteConvFile = false; #endif - m_fileEncoding = wxEmptyString; + m_fileEncoding.clear(); } void wxRichTextXMLHelper::SetupForSaving(const wxString& enc) diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index b7e33cda26..3a9f543220 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -548,8 +548,8 @@ void ScintillaWX::Paste() { #if wxUSE_UNICODE // free up the old character buffer in case the text is real big - data.SetText(wxEmptyString); - text = wxEmptyString; + text.clear(); + data.SetText(text); #endif const size_t len = buf.length(); SelectionPosition selStart = sel.IsRectangular() ?