[Cmake-commits] [cmake-commits] king committed cmCursesMainForm.cxx 1.75 1.76

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Sep 11 08:18:02 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CursesDialog
In directory public:/mounts/ram/cvs-serv1018/Source/CursesDialog

Modified Files:
	cmCursesMainForm.cxx 
Log Message:
Add parentheses around '&&' between '||' for gcc

The GNU compiler warns about possible operator precedence mistakes and
asks for explicit parentheses (-Wparentheses).  We add the parentheses
to silence the warning.  This also fixes one real logic error in the
find_package() implementation by correcting expression evaluation order.


Index: cmCursesMainForm.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CursesDialog/cmCursesMainForm.cxx,v
retrieving revision 1.75
retrieving revision 1.76
diff -C 2 -d -r1.75 -r1.76
*** cmCursesMainForm.cxx	5 Mar 2009 20:17:06 -0000	1.75
--- cmCursesMainForm.cxx	11 Sep 2009 12:17:58 -0000	1.76
***************
*** 232,236 ****
        cmCacheManager::CacheIterator mit = 
          this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!       if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))
          {
          continue;
--- 232,237 ----
        cmCacheManager::CacheIterator mit = 
          this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!       if (mit.IsAtEnd() ||
!           (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
          {
          continue;
***************
*** 260,264 ****
      cmCacheManager::CacheIterator mit = 
        this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!     if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))
        {
        continue;
--- 261,266 ----
      cmCacheManager::CacheIterator mit = 
        this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!     if (mit.IsAtEnd() ||
!         (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
        {
        continue;
***************
*** 328,332 ****
        cmCacheManager::CacheIterator mit = 
          this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!       if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))
          {
          continue;
--- 330,335 ----
        cmCacheManager::CacheIterator mit = 
          this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!       if (mit.IsAtEnd() ||
!           (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
          {
          continue;
***************
*** 345,349 ****
      cmCacheManager::CacheIterator mit = 
        this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!     if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED"))
        {
        continue;
--- 348,353 ----
      cmCacheManager::CacheIterator mit = 
        this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
!     if (mit.IsAtEnd() ||
!         (!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
        {
        continue;
***************
*** 915,922 ****
          }
        */
!       else if ( key >= 'a' && key <= 'z' || 
!                 key >= 'A' && key <= 'Z' ||
!                 key >= '0' && key <= '9' ||
!                 key == '_' )
          {
          if ( this->SearchString.size() < static_cast<std::string::size_type>(x-10) )
--- 919,926 ----
          }
        */
!       else if ((key >= 'a' && key <= 'z') ||
!                (key >= 'A' && key <= 'Z') ||
!                (key >= '0' && key <= '9') ||
!                (key == '_' ))
          {
          if ( this->SearchString.size() < static_cast<std::string::size_type>(x-10) )



More information about the Cmake-commits mailing list