Changeset 985 in Sophya


Ignore:
Timestamp:
May 2, 2000, 3:36:15 PM (25 years ago)
Author:
ansari
Message:

Remplacement string.compare() par .substr() == , Reza 2/5/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsspherehealpix.cc

    r972 r985  
    170170  int id= SphereCoordSys_NEUTRAL;
    171171  string description= "NEUTRAL SphereCoordSystem";
    172   string coordsys= dvl.GetS("COORDSYS");   
    173   if(coordsys.compare(0,7,"ROTATION",0,7) == 0)
     172  string coordsys= dvl.GetS("COORDSYS");
     173  // $CHECK$ - Reza 2/05/2000 - compare(size_t, size_t,...) passe pas sur g++     
     174  //  if(coordsys.compare(0,7,"ROTATION",0,7) == 0)  $CHECK$
     175  if(coordsys.substr(0,8) == "ROTATION")
    174176    {
    175177      id= SphereCoordSys_ROTATION;
    176178      description= "ROTATION SphereCoordSystem";
    177179    }
    178   else if(coordsys.compare(0,4,"OTHER",0,4) == 0)
     180  //  else if(coordsys.compare(0,4,"OTHER",0,4) == 0) $CHECK$ Reza 2/05/2000
     181  else if(coordsys.substr(0,5)  == "OTHER" )
    179182    {
    180183      id= SphereCoordSys_OTHER;
     
    184187
    185188  string ordering= dvl.GetS("ORDERING");
    186   if(ordering.compare(0,3,"RING",0,3) != 0)
     189  //  if(ordering.compare(0,3,"RING",0,3) != 0)  $CHECK$ Reza 2/05/2000
     190  if(ordering.substr(0,4) != "RING" )
    187191    {
    188       cout << " ORDERING= " << ordering << endl;
     192      cerr << "FITS_SphereHEALPix/Error Not supported ORDERING= "
     193           << ordering << " substr(0,4)=[" << ordering.substr(0,4) << "]" << endl;
    189194      throw IOExc(" FITS_SphereHEALPix:: numerotation non RING");
    190195    }
Note: See TracChangeset for help on using the changeset viewer.