Use wxString::empty() function calls to determine if string is empty in wxPG.
Use this dedicated function instead of explicitly check if wxString::length() returns non-zero value.
This commit is contained in:
@@ -982,7 +982,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
|
||||
|
||||
if ( !label.empty() )
|
||||
{
|
||||
wxASSERT_MSG( !pageObj->m_label.length(),
|
||||
wxASSERT_MSG( pageObj->m_label.empty(),
|
||||
wxT("If page label is given in constructor, empty label must be given in AddPage"));
|
||||
pageObj->m_label = label;
|
||||
}
|
||||
|
@@ -2299,7 +2299,7 @@ void wxPGProperty::DoAddChild( wxPGProperty* prop, int index,
|
||||
|
||||
void wxPGProperty::DoPreAddChild( int index, wxPGProperty* prop )
|
||||
{
|
||||
wxASSERT_MSG( prop->GetBaseName().length(),
|
||||
wxASSERT_MSG( !prop->GetBaseName().empty(),
|
||||
"Property's children must have unique, non-empty "
|
||||
"names within their scope" );
|
||||
|
||||
|
@@ -1692,7 +1692,7 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property,
|
||||
|
||||
if ( scheduledParent && !scheduledParent->IsCategory() )
|
||||
{
|
||||
wxASSERT_MSG( property->GetBaseName().length(),
|
||||
wxASSERT_MSG( !property->GetBaseName().empty(),
|
||||
"Property's children must have unique, non-empty names within their scope" );
|
||||
}
|
||||
|
||||
|
@@ -95,7 +95,7 @@ wxString wxStringProperty::ValueToString( wxVariant& value,
|
||||
// Value stored in m_value is non-editable, non-full value
|
||||
if ( (argFlags & wxPG_FULL_VALUE) ||
|
||||
(argFlags & wxPG_EDITABLE_VALUE) ||
|
||||
!s.length() )
|
||||
s.empty() )
|
||||
{
|
||||
// Calling this under incorrect conditions will fail
|
||||
wxASSERT_MSG( argFlags & wxPG_VALUE_IS_CURRENT,
|
||||
|
Reference in New Issue
Block a user