Changeset 3572 in Sophya for trunk/SophyaPI/PIext/pisiadw.cc


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pisiadw.cc

    r3374 r3572  
    244244
    245245bool ok = true;
    246 #ifdef SANS_EVOLPLANCK
    247 TRY {
    248   mPin = new PInPersist(flnm);
    249 }  CATCH(merr)
    250   { printf("ObjMgrWind::SetFile Exception= %ld (%s) \n", (long)merr, PeidaExc(merr));
    251   ok = false; } ENDTRY;
    252 #else
    253246try {
    254247  mPin = new PInPersist(flnm);
     
    258251  ok = false;
    259252  }
    260 #endif
    261253
    262254if (!ok) { mPin = NULL;  dap->SetReady(); return; }
    263255
    264256int nbtags = 0;
    265 #ifdef SANS_EVOLPLANCK
    266 nbtags = mPin->NbTags();
    267 #else
    268257nbtags = mPin->NbNameTags();
    269 #endif
    270258
    271259if (nbtags < 1) {
     
    282270objlist->SetBorderWidth(2);
    283271
    284 
    285 #ifdef SANS_EVOLPLANCK
    286 for(i=0; i<mPin->NbTags(); i++) {
    287   key = mPin->TagKey(i, cid, ln);  // $CHECK$ non-const & reference initialized to temporary, car int -> long&
    288   if (ln <= 0)  nom = "?";
    289   else { strncpy(noms, mPin->TagName(i).c_str(), 31);  noms[31] = '\0'; nom = noms; }
    290   sprintf(strg, "%s  (T=%s, Key=%d)",  nom, dap->ObjMgr()->GetServiceObj()->PClassIdToClassName(cid), key);
    291   //  sprintf(strg, "%s  (T=%s, Key=%d)",  nom, " DataObject ?", key);  Attention SANS_EVOLPLANCK
    292   objlist->AppendItem(strg, 5000+i);
    293 }
    294 #else
    295272string tn;
    296273for(i=0; i<mPin->NbNameTags(); i++) {
     
    298275  objlist->AppendItem(tn.c_str(), 5000+i);
    299276}
    300 #endif
    301277
    302278}
Note: See TracChangeset for help on using the changeset viewer.