Changeset 1598

Show
Ignore:
Timestamp:
12/01/07 10:29:50 (9 months ago)
Author:
peter
Message:

source/cddefines.h:

  • Fix indentation, several cosmetic changes. No change in functionality.

source/helike_cs.cpp:

  • Fix compiler warnings about missing newline and prototype without corresponding routine.

source/lines_service.h:
source/lines_service.cpp:

  • Fix compiler warning about deprecated conversion const char* -> char*.

source/hydrocollid.cpp:

  • Fix compiler warnings about unused variable and prototype without corresponding routine.
Location:
trunk/source
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/source/cddefines.h

    r1596 r1598  
    837837        static const int _nd = lgBC ? 3 : 1; 
    838838        T* p[_nd]; // p[0] current pointer, p[1] lower bound, p[2] upper bound 
    839         void bounds_check(const T* t) const 
    840         { 
    841 #ifdef _MSC_VER 
    842                 /* disable warning that conditional expression is constant, true or false in if */ 
    843 #       pragma warning( disable : 4127 ) 
    844 #endif 
    845                 if (lgBC)  
     839        void _bounds_check( const T* t ) const 
     840        { 
     841#ifdef _MSC_VER 
     842                /* disable warning that conditional expression is constant, true or false in if */ 
     843#               pragma warning( disable : 4127 ) 
     844#endif 
     845                if( lgBC )  
    846846                { 
    847847                        if( t < p[1] || t >= p[2] ) 
     
    850850                                fprintf( ioQQQ, " ptr = %#lx, valid region: %#lx <= ptr < %#lx\n", 
    851851#ifdef _MSC_VER 
    852                                                                  (size_t)t, (size_t)p[1], (size_t)p[2] ); 
     852                                        (size_t)t, (size_t)p[1], (size_t)p[2] ); 
    853853#else 
    854                                           (unsigned long)t, (unsigned long)p[1], (unsigned long)p[2] ); 
    855 #endif 
    856                         TotalInsanity(); 
    857                   } 
    858                 } 
    859         } 
    860   T* index_checked ( const ptrdiff_t n) const 
    861   { 
    862           T* t; 
    863     t = p[0]+n; 
    864     bounds_check(t); 
    865     return t; 
    866   } 
    867         void set_vals(T* p0, T* p1, T* p2) 
    868         { 
    869 #ifdef _MSC_VER 
    870                 /* disable warning that conditional expression is constant, true or false in if */ 
    871 #       pragma warning( disable : 4127 ) 
     854                                        (unsigned long)t, (unsigned long)p[1], (unsigned long)p[2] ); 
     855#endif 
     856                                TotalInsanity(); 
     857                        } 
     858                } 
     859        } 
     860        T* _index_checked ( const ptrdiff_t n ) const 
     861        { 
     862                T* t = p[0]+n; 
     863                _bounds_check(t); 
     864                return t; 
     865        } 
     866        void _set_vals( T* p0, T* p1, T* p2 ) 
     867        { 
     868#ifdef _MSC_VER 
     869                /* disable warning that conditional expression is constant, true or false in if */ 
     870#               pragma warning( disable : 4127 ) 
    872871#endif 
    873872                if( lgBC ) 
     
    882881        basic_pntr( T* p0, T* p1, T* p2 ) 
    883882        { 
    884                 set_vals(p0,p1,p2); 
     883                _set_vals( p0, p1, p2 ); 
    885884        } 
    886885        basic_pntr( T* p0 ) 
    887886        { 
    888                 set_vals(p0,NULL,NULL); 
     887                _set_vals( p0, NULL, NULL ); 
    889888        } 
    890889public: 
    891890        basic_pntr() 
    892891        { 
    893                 set_vals(NULL,NULL,NULL); 
     892                _set_vals( NULL, NULL, NULL ); 
    894893        } 
    895894        basic_pntr( const basic_pntr& t ) 
     
    897896                *this = t; 
    898897        } 
    899   // virtual destructor (in case of destruction via basic_pntr*, see Sutter EC++ p77) 
    900   virtual ~basic_pntr() {}; 
     898        // virtual destructor (in case of destruction via basic_pntr*, see Sutter EC++ p77) 
     899        virtual ~basic_pntr() {}; 
    901900        // pre-increment 
    902   basic_pntr& operator++ () 
     901        basic_pntr& operator++ () 
    903902        { 
    904903                ++p[0]; 
    905904                return *this; 
    906905        } 
    907   // post-increment 
    908   const basic_pntr operator++ (int) 
    909         { 
    910                 basic_pntr t (*this); 
    911                 ++*this; 
     906        // post-increment 
     907        const basic_pntr operator++ (int) 
     908        { 
     909                basic_pntr t( *this ); 
     910                ++(*this); 
    912911                return t; 
    913912        } 
     
    919918        } 
    920919        // post-decrement 
    921   const basic_pntr operator-- (int) 
    922         { 
    923                 basic_pntr t (*this); 
    924                 --*this; 
     920        const basic_pntr operator-- (int) 
     921        { 
     922                basic_pntr t( *this ); 
     923                --(*this); 
    925924                return t; 
    926925        } 
     
    929928        // conversion from basic_pntr -> pntr or const_pntr to work; this would also create 
    930929        // an implicit and silent conversion from const_pntr -> pntr, which is illegal... 
    931   basic_pntr& operator+= ( const ptrdiff_t n ) { p[0] += n; return *this; } 
     930        basic_pntr& operator+= ( const ptrdiff_t n ) { p[0] += n; return *this; } 
    932931        basic_pntr& operator-= ( const ptrdiff_t n ) { p[0] -= n; return *this; } 
    933932        // dereference 
    934933        T& operator* () const 
    935934        { 
    936                 return *(index_checked(0)); 
     935                return *(_index_checked(0)); 
    937936        } 
    938937        T* operator-> () const 
    939938        { 
    940                 return index_checked(0); 
     939                return _index_checked(0); 
    941940        } 
    942941        T& operator[] ( const ptrdiff_t n ) const 
    943942        { 
    944                 return *(index_checked(n)); 
     943                return *(_index_checked(n)); 
    945944        } 
    946945        // finally, define the boolean operators... 
     
    969968        const pntr operator+ ( const ptrdiff_t n ) const { pntr s = *this; s += n; return s; } 
    970969        const pntr operator- ( const ptrdiff_t n ) const { pntr s = *this; s -= n; return s; } 
    971         /* const */ ptrdiff_t operator- ( const pntr& t ) const { return &(*this[0]) - &t[0]; } 
     970        ptrdiff_t operator- ( const pntr& t ) const { return &(*this[0]) - &t[0]; } 
    972971}; 
    973972 
     
    10201019        const const_pntr operator+ ( const ptrdiff_t n ) const { const_pntr s = *this; s += n; return s; } 
    10211020        const const_pntr operator- ( const ptrdiff_t n ) const { const_pntr s = *this; s -= n; return s; } 
    1022         /* const */ ptrdiff_t operator- ( const const_pntr& t ) const { return &(*this[0]) - &t[0]; } 
     1021        ptrdiff_t operator- ( const const_pntr& t ) const { return &(*this[0]) - &t[0]; } 
    10231022}; 
    10241023 
  • trunk/source/helike_cs.cpp

    r1579 r1598  
    3333STATIC double L_mix_integrand_VF01( double alpha ); 
    3434STATIC double StarkCollTransProb_VF01( long int n, long int l, long int lp, double alpha, double deltaPhi); 
    35 STATIC void helike_collisional_ionization( long nelem ); 
    3635 
    3736static long     int global_ipISO, global_n, global_l, global_l_prime, global_s, global_z, global_Collider; 
  • trunk/source/hydrocollid.cpp

    r1579 r1598  
    3737 
    3838STATIC realnum OLDHydroCSInterp( long int nelem, long int ipHi, long int ipLo ); 
    39 STATIC realnum HydroCSInterp( long int nelem, long int ipHi, long int ipLo, long int Collider ); 
     39// STATIC realnum HydroCSInterp( long int nelem, long int ipHi, long int ipLo, long int Collider ); 
    4040 
    4141/*HCSAR_interp interpolate on collision strengths */ 
     
    5252/* These are masses relative to the proton mass of the electron, proton, he+, and alpha particle. */ 
    5353static double ColliderMass[4] = {ELECTRON_MASS/PROTON_MASS, 1.0, 4.0, 4.0}; 
    54 static double ColliderCharge[4] = {1.0, 1.0, 1.0, 2.0}; 
     54// static double ColliderCharge[4] = {1.0, 1.0, 1.0, 2.0}; 
    5555 
    5656/*===================================================================================*/ 
  • trunk/source/lines_service.cpp

    r1571 r1598  
    730730 
    731731/*PutLine enter local line intensity into the intensity stack for eventual printout */ 
    732 void PutLine(transition * t, const char *chComment, char *chLabelTemp) 
     732void PutLine(transition * t, const char *chComment, const char *chLabelTemp) 
    733733{ 
    734734        char chLabel[5]; 
  • trunk/source/lines_service.h

    r1499 r1598  
    7474\param *chLabel the line label 
    7575*/ 
    76 void PutLine(transition * t, const char *chComment, char *chLabel); 
     76void PutLine(transition * t, const char *chComment, const char *chLabel); 
    7777 
    7878/**TexcLine derive excitation temperature of line from contents of line array