Changeset 3572 in Sophya for trunk/SophyaLib/SUtils


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/SUtils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SUtils/datacards.cc

    r2615 r3572  
    11//
    2 // $Id: datacards.cc,v 1.10 2004-09-10 09:54:48 cmv Exp $
     2// $Id: datacards.cc,v 1.11 2009-02-07 21:49:59 cmv Exp $
    33//
    44//
     
    217217DataCards::GetKey(int num) const
    218218{
    219   if ((num < 0) || (num >= cards.size()) )  return("");
     219  if ((num < 0) || (num >= (int)cards.size()) )  return("");
    220220  int k = 0;
    221221  CardList::const_iterator i;
     
    234234  DataCards::CardList::const_iterator it = FindKeyC(key);
    235235  if (it == cards.end()) return(rs);
    236   for (int k=0; k<(*it).tokens.size(); k++) {
     236  for (size_t k=0; k<(*it).tokens.size(); k++) {
    237237    rs += ' ';  rs += (*it).tokens[k];
    238238  }
     
    246246  DataCards::CardList::const_iterator it = FindKeyC(key);
    247247  if (it == cards.end()) return(def);
    248   if ( (numero < 0) || (numero >= (*it).tokens.size()) )  return def;
     248  if ( (numero < 0) || (numero >= (int)((*it).tokens.size())) )  return def;
    249249  return (*it).tokens[numero];
    250250}
     
    308308DataCards::ApplyPF(CrdPF & cpf, string const& key, string const& toks)
    309309{
    310 int l,lk;
     310size_t l,lk;
    311311int rc = 0;
    312312// On verifie si le "pattern" correspond
  • trunk/SophyaLib/SUtils/strutilxx.cc

    r2706 r3572  
    1313// considering char "sep" as a separator.
    1414// Vector is filled from its end (no reset done).
    15 // Tp write a "sep" char, use \'sep'
     15// To write a "sep" char, use \'sep'
    1616// Warning: separator "sep" could not be set to '\'
    1717// Ex: sep=' ': s="aaa   bbb cc d " -> vs=(aaa,bbb,cc,d)
     
    5555// - Fill "vs" at the end: NO RESET IS DONE
    5656// - If ',' is the separator, ",,," is c
    57 // That routine is much more rapid than FillVStringFrString altouch less general
     57// That routine is much more rapid than FillVStringFrString although less general
    5858//           (ex no '\' gestion is done)
    5959{
    6060 uint_4 ls = s.size();
    6161 if(ls<=0) return;
    62  bool sep_non_blanc = (separator==' ')? false: true;
     62 //bool sep_non_blanc = (separator==' ')? false: true;
    6363 char *str = new char[ls+2];
    6464
  • trunk/SophyaLib/SUtils/utils.cc

    r2615 r3572  
    11// This may look like C code, but it is really -*- C++ -*-
    22//
    3 // $Id: utils.cc,v 1.2 2004-09-10 09:54:49 cmv Exp $
     3// $Id: utils.cc,v 1.3 2009-02-07 21:49:59 cmv Exp $
    44//
    55
     
    1515  int i;   // THINK C ne veut pas du int i dans chaque for...
    1616  if (dest < source)
    17     for (i=0; i<n; i++)
     17    for (i=0; i<(int)n; i++)
    1818      ((char*)dest)[i] = ((char*)source)[i];
    1919  else
Note: See TracChangeset for help on using the changeset viewer.