Changeset 9247be0 in tol


Ignore:
Timestamp:
Mar 16, 2011, 3:03:48 PM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
3fdcd40
Parents:
12a919e
Message:

Refs #1111
Refs #1121
Fixing bugs wich were hiding by solved memory leak

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3305 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tol/bbasic/txtalgeb.cpp

    r12a919e r9247be0  
    106106{
    107107//InitTotalTime("BText::Copy BChar*");
    108   if(this!=&txt)
     108 
     109  if(&txt && (this!=&txt))
    109110  {
    110111    if(!buffer_) { AllocateBuffer(0); }
  • tol/btol/bgrammar/oprimp.cpp

    r12a919e r9247be0  
    677677  TRACE_SHOW_MEDIUM(fun," 3");
    678678  BGrammar::PutLast(gra);
    679         if(!(rightResult = gra->EvaluateTree(tre)))
     679  rightResult = gra->EvaluateTree(tre);
     680        if(!rightResult || ((rightResult->Mode()!=BOBJECTMODE) &&
     681                      (rightResult->Mode()!=BBUILTINFUNMODE) &&
     682                      (rightResult->Mode()!=BUSERFUNMODE)))
    680683  {
    681684    TRACE_SHOW_MEDIUM(fun," 4");
  • tol/btol/bgrammar/tol_bgentmp.h

    r12a919e r9247be0  
    6060    }
    6161  }
     62  Any* GetResult() const
     63  {
     64    if(result_->Mode()!=BOBJECTMODE)
     65    {
     66      Error("[FATAL] Non expect mode of syntax object.");
     67      return(NULL);
     68    }
     69    return(result_);
     70  }
    6271 const BText& Expression  () const
    6372  {
    64     if(result_) { return(result_->Expression()); }
    65     else        { return(this->CBTextNullRef()); }
     73    if(GetResult()) { return(result_->Expression()); }
     74    else            { return(this->CBTextNullRef()); }
    6675  }
    6776  const BText& TolPath     () const
    6877  {
    69     if(result_) { return(result_->TolPath()); }
    70     else        { return(this->CBTextNullRef()); }
     78    if(GetResult()) { return(result_->TolPath()); }
     79    else            { return(this->CBTextNullRef()); }
    7180  }
    7281  BText Dump() const
    7382  {
    74         if(result_) { return(result_->Dump()); }
    75         else          { return("NULL"); }
     83        if(GetResult()) { return(result_->Dump()); }
     84        else              { return("NULL"); }
    7685  }
    7786  BText Info() const
    7887  {
    79         if(result_) { return(result_->Info()); }
    80         else          { return("NULL"); }
     88        if(GetResult()) { return(result_->Info()); }
     89        else              { return("NULL"); }
    8190  }
    8291  void ReCalc()
    8392  {
    84         if(result_) { result_->ReCalc(); }
    85   }
    86   Any* GetResult() const { return(result_); }
     93        if(GetResult()) { result_->ReCalc(); }
     94  }
    8795};
    8896
Note: See TracChangeset for help on using the changeset viewer.