[Kst] kdeextragear-2/kst/kst/datasources/lfiio

Andrew Walker arwalker at sumusltd.com
Sat Feb 7 01:59:50 CET 2004


CVS commit by arwalker: 

fits_modify_vector_len( ) is not necessary and hampers performance


  M +3 -7      lfiio.cpp   1.4


--- kdeextragear-2/kst/kst/datasources/lfiio/lfiio.cpp  #1.3:1.4
@@ -174,4 +174,6 @@ int LFIIOSource::readField( double *v, c
   else
   {
+    memset( v, 0, n * sizeof( double ) );
+    
     bOk = getColNumber( field, &iCol );
     if( bOk ) 
@@ -190,7 +192,4 @@ int LFIIOSource::readField( double *v, c
           // N.B. fitsio column indices are 1 based, so we ask for iCol+1 instead of just iCol
           //
-          fits_modify_vector_len( ffits, iCol+1, 1, &iStatus );
-          
-          iStatus = 0;
           iResult = fits_read_col( ffits, TDOUBLE, iCol+1, s+1, 1, n, &dNan, v, &iAnyNull, &iStatus );
           if( iResult == 0 )
@@ -198,9 +197,6 @@ int LFIIOSource::readField( double *v, c
             iRead = n;
           }
-          else
-          {
-            iStatus = 0;
-          }
           
+          iStatus = 0;
           fits_close_file( ffits, &iStatus );      
         }





More information about the Kst mailing list