Ignore:
Timestamp:
Sep 19, 2000, 5:09:28 PM (25 years ago)
Author:
ansari
Message:

changement de char* en string

File:
1 edited

Legend:

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

    r1182 r1194  
    8989  int nSide= dobj_->SizeIndex();
    9090  dvl["NSIDE"]= (int_4) nSide;
    91   cout << " je n'ecris plus nside " << endl;
    9291  dvl.SetComment("NSIDE","Resolution parameter for HEALPIX" );
    9392
     
    10099   
    101100  // On ecrit les dataBlocks
    102   char** Noms = new char*[1];   
    103   Noms[0]= new char[15];
    104   strncpy(Noms[0],dvl.GetS("Content").c_str(),15);
    105   char extname[15] = "SIMULATION";
    106 
    107   char Type[2];
    108   if (typeid(T) == typeid(r_8) ) Type[0]='D';
     101  vector<string> Noms;   
     102  Noms.push_back(dvl.GetS("Content"));
     103  string extname("SIMULATION");
     104
     105  string Type;
     106  if (typeid(T) == typeid(r_8) ) Type+='D';
    109107  else
    110     if (typeid(T) == typeid(r_4) )  Type[0]='E';
     108    if (typeid(T) == typeid(r_4) )  Type+='E';
    111109    else
    112110      {
     
    114112        throw IOExc("FITS_SphereHEALPix:: unknown type");
    115113      }
    116   Type[1]='\0';
    117114  vector<int> dummy;
    118115  os.makeHeaderBntblOnFits(Type, Noms, nPix, 1, dvl, extname, dummy);
    119   delete [] Noms[0];
    120   delete [] Noms;
    121116  os.putColToFits(0,  nPix, dobj_->pixels_.Data());
    122117}
Note: See TracChangeset for help on using the changeset viewer.