[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kspread
From:       Stefan Nikolaus <stefan.nikolaus () kdemail ! net>
Date:       2007-01-06 11:25:59
Message-ID: 1168082759.482992.22578.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 620494 by nikolaus:

Think!


 M  +2 -2      CellView.cpp  
 M  +2 -2      SheetView.cpp  
 M  +8 -8      storage/PointStorage.h  


--- trunk/koffice/kspread/CellView.cpp #620493:620494
@@ -146,8 +146,8 @@
 CellView::CellView( SheetView* sheetView, int col, int row )
     : d( Private::empty( sheetView->sheet() ) )
 {
-    Q_ASSERT( 0 <= col <= KS_colMax );
-    Q_ASSERT( 0 <= row <= KS_rowMax );
+    Q_ASSERT( 0 <= col && col <= KS_colMax );
+    Q_ASSERT( 0 <= row && row <= KS_rowMax );
 
     const Sheet* sheet = sheetView->sheet();
     Cell* const cell = sheet->cellAt( col, row );
--- trunk/koffice/kspread/SheetView.cpp #620493:620494
@@ -64,8 +64,8 @@
 
 CellView SheetView::cellView( int col, int row )
 {
-    Q_ASSERT( 1 <= col <= KS_colMax );
-    Q_ASSERT( 1 <= row <= KS_rowMax );
+    Q_ASSERT( 1 <= col && col <= KS_colMax );
+    Q_ASSERT( 1 <= row && col <= KS_rowMax );
     if ( !d->cache.contains( QPoint(col,row) ) )
     {
         d->cache.insert( QPoint(col,row), new CellView( this, col, row ) );
--- trunk/koffice/kspread/storage/PointStorage.h #620493:620494
@@ -84,8 +84,8 @@
      */
     T insert( int col, int row, const T& data )
     {
-        Q_ASSERT( 1 <= col <= KS_colMax );
-        Q_ASSERT( 1 <= row <= KS_rowMax );
+        Q_ASSERT( 1 <= col && col <= KS_colMax );
+        Q_ASSERT( 1 <= row && row <= KS_rowMax );
         // row's missing?
         if ( row > m_rows.count() )
         {
@@ -139,8 +139,8 @@
      */
     T lookup( int col, int row ) const
     {
-        Q_ASSERT( 1 <= col <= KS_colMax );
-        Q_ASSERT( 1 <= row <= KS_rowMax );
+        Q_ASSERT( 1 <= col && col <= KS_colMax );
+        Q_ASSERT( 1 <= row && row <= KS_rowMax );
         // is the row not present?
         if ( row - 1 > m_rows.count() )
             return T();
@@ -162,8 +162,8 @@
      */
     T take( int col, int row )
     {
-        Q_ASSERT( 1 <= col <= KS_colMax );
-        Q_ASSERT( 1 <= row <= KS_rowMax );
+        Q_ASSERT( 1 <= col && col <= KS_colMax );
+        Q_ASSERT( 1 <= row && row <= KS_rowMax );
         // row's missing?
         if ( row - 1 > m_rows.count() )
             return T();
@@ -215,7 +215,7 @@
      */
     QList< QPair<QPoint,T> > insertRows( int position, int number = 1 )
     {
-        Q_ASSERT( 1 <= position <= KS_rowMax );
+        Q_ASSERT( 1 <= position && position <= KS_rowMax );
         // row's missing?
         if ( position - 1 > m_rows.count() )
             return QList< QPair<QPoint,T> >();
@@ -255,7 +255,7 @@
      */
     QList< QPair<QPoint,T> > removeRows( int position, int number = 1 )
     {
-        Q_ASSERT( 1 <= position <= KS_rowMax );
+        Q_ASSERT( 1 <= position && position <= KS_rowMax );
         // row's missing?
         if ( position - 1 > m_rows.count() )
             return QList< QPair<QPoint,T> >();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic