Use wxString::empty() instead of comparison to wxEmptyString
This commit is contained in:
@@ -478,7 +478,7 @@ wxString wxArchiveFSHandler::DoFind()
|
|||||||
wxString namestr, dir, filename;
|
wxString namestr, dir, filename;
|
||||||
wxString match;
|
wxString match;
|
||||||
|
|
||||||
while (match == wxEmptyString)
|
while (match.empty())
|
||||||
{
|
{
|
||||||
m_FindEntry = m_Archive->GetNext(m_FindEntry);
|
m_FindEntry = m_Archive->GetNext(m_FindEntry);
|
||||||
|
|
||||||
|
@@ -1632,7 +1632,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom)
|
|||||||
|
|
||||||
int wxPreviewControlBar::GetZoomControl()
|
int wxPreviewControlBar::GetZoomControl()
|
||||||
{
|
{
|
||||||
if (m_zoomControl && (m_zoomControl->GetStringSelection() != wxEmptyString))
|
if (m_zoomControl && !m_zoomControl->GetStringSelection().empty())
|
||||||
{
|
{
|
||||||
long val;
|
long val;
|
||||||
if (m_zoomControl->GetStringSelection().BeforeFirst(wxT('%')).ToLong(&val))
|
if (m_zoomControl->GetStringSelection().BeforeFirst(wxT('%')).ToLong(&val))
|
||||||
|
@@ -865,9 +865,9 @@ wxString wxTarInputStream::GetExtendedHeader(const wxString& key) const
|
|||||||
|
|
||||||
wxString wxTarInputStream::GetHeaderPath() const
|
wxString wxTarInputStream::GetHeaderPath() const
|
||||||
{
|
{
|
||||||
wxString path;
|
wxString path(GetExtendedHeader(wxS("path")));
|
||||||
|
|
||||||
if ((path = GetExtendedHeader(wxT("path"))) != wxEmptyString)
|
if (!path.empty())
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
path = wxString(m_hdr->Get(TAR_NAME), GetConv());
|
path = wxString(m_hdr->Get(TAR_NAME), GetConv());
|
||||||
@@ -880,10 +880,10 @@ wxString wxTarInputStream::GetHeaderPath() const
|
|||||||
|
|
||||||
wxDateTime wxTarInputStream::GetHeaderDate(const wxString& key) const
|
wxDateTime wxTarInputStream::GetHeaderDate(const wxString& key) const
|
||||||
{
|
{
|
||||||
wxString value;
|
wxString value(GetExtendedHeader(key));
|
||||||
|
|
||||||
// try extended header, stored as decimal seconds since the epoch
|
// try extended header, stored as decimal seconds since the epoch
|
||||||
if ((value = GetExtendedHeader(key)) != wxEmptyString) {
|
if (!value.empty()) {
|
||||||
wxLongLong ll;
|
wxLongLong ll;
|
||||||
ll.Assign(wxAtof(value) * 1000.0);
|
ll.Assign(wxAtof(value) * 1000.0);
|
||||||
return ll;
|
return ll;
|
||||||
@@ -897,9 +897,9 @@ wxDateTime wxTarInputStream::GetHeaderDate(const wxString& key) const
|
|||||||
|
|
||||||
wxTarNumber wxTarInputStream::GetHeaderNumber(int id) const
|
wxTarNumber wxTarInputStream::GetHeaderNumber(int id) const
|
||||||
{
|
{
|
||||||
wxString value;
|
wxString value(GetExtendedHeader(m_hdr->Name(id)));
|
||||||
|
|
||||||
if ((value = GetExtendedHeader(m_hdr->Name(id))) != wxEmptyString) {
|
if (!value.empty()) {
|
||||||
wxTarNumber n = 0;
|
wxTarNumber n = 0;
|
||||||
wxString::const_iterator p = value.begin();
|
wxString::const_iterator p = value.begin();
|
||||||
while (p != value.end() && *p == ' ')
|
while (p != value.end() && *p == ' ')
|
||||||
@@ -914,12 +914,12 @@ wxTarNumber wxTarInputStream::GetHeaderNumber(int id) const
|
|||||||
|
|
||||||
wxString wxTarInputStream::GetHeaderString(int id) const
|
wxString wxTarInputStream::GetHeaderString(int id) const
|
||||||
{
|
{
|
||||||
wxString value;
|
wxString value(GetExtendedHeader(m_hdr->Name(id)));
|
||||||
|
|
||||||
if ((value = GetExtendedHeader(m_hdr->Name(id))) != wxEmptyString)
|
if (value.empty())
|
||||||
return value;
|
value = wxString(m_hdr->Get(id), GetConv());
|
||||||
|
|
||||||
return wxString(m_hdr->Get(id), GetConv());
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// An extended header consists of one or more records, each constructed:
|
// An extended header consists of one or more records, each constructed:
|
||||||
|
@@ -1005,7 +1005,7 @@ long wxWebViewWebKit::Find(const wxString& text, int flags)
|
|||||||
m_findText = text;
|
m_findText = text;
|
||||||
|
|
||||||
//If the search string is empty then we clear any selection and highlight
|
//If the search string is empty then we clear any selection and highlight
|
||||||
if(text == "")
|
if (text.empty())
|
||||||
{
|
{
|
||||||
webkit_web_view_unmark_text_matches(m_web_view);
|
webkit_web_view_unmark_text_matches(m_web_view);
|
||||||
webkit_web_view_set_highlight_text_matches(m_web_view, false);
|
webkit_web_view_set_highlight_text_matches(m_web_view, false);
|
||||||
|
Reference in New Issue
Block a user