summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-14 23:06:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 13:25:24 (GMT)
commitd92887efabad6a91e221588d0dc7a0bffd91a9f7 (patch)
tree0436e742b7efd6071e01879b90fd71d5890d8b1c /Source/CursesDialog
parentf3e92d281682ee482b1425675b9fccd372cd01f3 (diff)
downloadCMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.zip
CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.gz
CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.bz2
Replace 'foo.size() > 0' pattern with !foo.empty().
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/cmCursesMainForm.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx
index 248efaf..dcd0b6c 100644
--- a/Source/CursesDialog/cmCursesMainForm.cxx
+++ b/Source/CursesDialog/cmCursesMainForm.cxx
@@ -893,7 +893,7 @@ void cmCursesMainForm::HandleInput()
if ( key == 10 || key == KEY_ENTER )
{
this->SearchMode = false;
- if ( this->SearchString.size() > 0 )
+ if (!this->SearchString.empty())
{
this->JumpToCacheEntry(this->SearchString.c_str());
this->OldSearchString = this->SearchString;
@@ -918,7 +918,7 @@ void cmCursesMainForm::HandleInput()
}
else if ( key == ctrl('h') || key == KEY_BACKSPACE || key == KEY_DC )
{
- if ( this->SearchString.size() > 0 )
+ if (!this->SearchString.empty())
{
this->SearchString.resize(this->SearchString.size()-1);
}
@@ -1067,7 +1067,7 @@ void cmCursesMainForm::HandleInput()
}
else if ( key == 'n' )
{
- if ( this->OldSearchString.size() > 0 )
+ if (!this->OldSearchString.empty())
{
this->JumpToCacheEntry(this->OldSearchString.c_str());
}
@@ -1201,7 +1201,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
int findex = start_index;
for(;;)
{
- if ( str.size() > 0 )
+ if (!str.empty())
{
cmCursesWidget* lbl = 0;
if ( findex >= 0 )