Changeset 3572 in Sophya for trunk/SophyaLib/BaseTools


Ignore:
Timestamp:
Feb 7, 2009, 10:50:34 PM (17 years ago)
Author:
cmv
Message:

char* -> const char* pour regler les problemes de deprecated string const... + comparaison unsigned signed + suppression EVOL_PLANCK rz+cmv 07/02/2009

Location:
trunk/SophyaLib/BaseTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/dvlist.cc

    r3233 r3572  
    115115/* --Methode-- */
    116116/*! Copy constructor - Object initialized using the PPF file \b flnm */
    117 DVList::DVList(char *flnm)
     117DVList::DVList(const char *flnm)
    118118{
    119119PInPersist s(flnm);
     
    192192// int_8   GetI(string const& key, int_8  def=-1)
    193193// r_8     GetD(string const& key, r_8 def=-9.e19)
    194 // string  GetS(string const& key, char* def="")
     194// string  GetS(string const& key, const char* def="")
    195195//      Retourne la valeur de la variable de nom "key" et de type entier, réél,
    196196//      chaine de caracteres.
     
    245245/*! Returns the value corresponding to name \b key, converted to string
    246246    Default value \b def is returned if name \b key not found */
    247 string      DVList::GetS(string const& key, char* def) const
     247string      DVList::GetS(string const& key, const char* def) const
    248248{
    249249ValList::const_iterator it = mvlist.find(key);
     
    265265// void  SetD(string const& key, r_8 val)
    266266// void  SetZ(string const& key, complex<r_8> val)
    267 // void  SetS(string const& key, char*  val)
     267// void  SetS(string const& key, const char*  val)
    268268// void  SetS(string const& key, string val)
    269269//      Crée la variable de nom "key", de type entier, double, complexe, string et
     
    322322/* --Methode-- */
    323323/*! Appends or sets the string value \b val in the list with name \b key */
    324 void        DVList::SetS(string const& key, char const* val)
     324void        DVList::SetS(string const& key, const char * val)
    325325{
    326326MuTyV div(val);
  • trunk/SophyaLib/BaseTools/dvlist.h

    r2826 r3572  
    2525                    DVList();
    2626                    DVList(const DVList&);
    27                     DVList(char *flnm);
     27                    DVList(const char *flnm);
    2828
    2929  virtual           ~DVList();
     
    3535
    3636  //! Returns the number of elements (variables) in DVList object
    37   inline int        Size() { return(mvlist.size()); }
     37  inline size_t     Size() const { return(mvlist.size()); }
    3838  //! Returns the number of elements (variables) in DVList object
    39   inline int        NVar() { return(mvlist.size()); }
     39  inline size_t     NVar() const { return(mvlist.size()); }
    4040
    4141  int_8             GetI(string const& key, int_8 def=-1) const;
    4242  r_8               GetD(string const& key, r_8 def=-9.e19) const;
    4343  complex<r_8>      GetZ(string const& key, complex<r_8> def=-9.e19) const;
    44   string            GetS(string const& key, char* def="") const;
     44  string            GetS(string const& key, const char* def="") const;
    4545  string            GetComment(string const& key) const;
    4646
     
    5151  void              SetD(string const& key, r_8 val);
    5252  void              SetZ(string const& key, complex<r_8> val);
    53   void              SetS(string const& key, char const*  val);
     53  void              SetS(string const& key, const char *  val);
    5454  void              SetS(string const& key, string const& val);
    5555  void              SetT(string const& key, TimeStamp const& val);
  • trunk/SophyaLib/BaseTools/ppfbinstream.cc

    r3525 r3572  
    511511        GetI8(i8);  // nb objets toplevel
    512512        GetU8(ui8); // nb de nametag
    513         for(int kt=0; kt<ui8; kt++) {
     513        for(uint_8 kt=0; kt<ui8; kt++) {
    514514          GetRawI4(i4);
    515515          s->seekg(i4,ios::cur);
     
    994994  int_4 tsz;
    995995  GetRawI4(tsz);
    996   if (tsz != sz)
     996  if (tsz != (int_4)sz)
    997997    throw FileFormatExc("PPFBinaryInputStream::GetPosTagTable Size mismatch ");
    998998  for(int kk=0; kk<tsz; kk++)
     
    10361036  // Pour indenter lors de l'impression
    10371037  #define _MXINDENT_ 10
    1038   char * indents[_MXINDENT_+1] = {"","  ", "    ", "      ", "        ", "          ",
     1038  const char * indents[_MXINDENT_+1] = {"","  ", "    ", "      ", "        ", "          ",
    10391039                                    "            ", "              ", "                ",
    10401040                                    "                  ", "                    "};
     
    11501150          GetI8s(stats,8);
    11511151          GetRawU8(ui8); // nb de nametag
    1152           for(int kt=0; kt<ui8; kt++) {
     1152          for(uint_8 kt=0; kt<ui8; kt++) {
    11531153            string tname;
    11541154            GetRawI8(i8);
  • trunk/SophyaLib/BaseTools/sophyainit.cc

    r3532 r3572  
    193193double SophyaInitiator::GetVersion(string& svers)
    194194{
    195   char* compiler = 0;
     195  const char* compiler = 0;
    196196  #ifdef __GNUG__
    197197  compiler = "gcc " __VERSION__;
  • trunk/SophyaLib/BaseTools/sversion.h

    r3532 r3572  
    33
    44#define SOPHYA_VERSION   2.1
    5 #define SOPHYA_REVISION  25
    6 #define SOPHYA_TAG       "V_Sep2008"
     5#define SOPHYA_REVISION  30
     6#define SOPHYA_TAG       "V_Fev2009"
    77
    88#endif
Note: See TracChangeset for help on using the changeset viewer.