Changeset 5937c50 in tol


Ignore:
Timestamp:
Apr 2, 2009, 10:33:52 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
dc0a604
Parents:
584d9b3
Message:

More robust assignation ensuring

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bgrammar/nameblock.cpp

    r584d9b3 r5937c50  
    5656      BObjByClassNameHash BNameBlock::usingSymbolsByClass_;
    5757
     58static BFixedSizeMemoryBase* BFSMEM_Hndlr =
     59 BFSMSingleton<sizeof(BNameBlock)>::Handler();
    5860
    5961//--------------------------------------------------------------------
    … …  
    101103  SetEmptyKey(public_ ,NULL);
    102104  SetEmptyKey(private_,NULL);
    103   short isAssigned = BObject::IsAssigned();
     105  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__);
    104106  createdWithNew_ = isAssigned!=-1;
    105107}
    … …  
    122124  SetEmptyKey(public_ ,NULL);
    123125  SetEmptyKey(private_,NULL);
    124   short isAssigned = BObject::IsAssigned();
     126  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__);
    125127  createdWithNew_ = isAssigned!=-1;
    126128}
    … …  
    141143  owner_    (NULL)
    142144{
    143   short isAssigned = BObject::IsAssigned();
     145  short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__);
    144146  createdWithNew_ = isAssigned!=-1;
    145147} 
    … …  
    205207//--------------------------------------------------------------------
    206208{
    207   if(createdWithNew_) { return(BObject::IsAssigned()); }
    208   else                { return(false); }
     209  if(createdWithNew_)
     210  {
     211    short isAssigned = BFSMEM_Hndlr->IsAssigned(this,this->_bfsm_PageNum__);
     212    return(isAssigned);
     213  }
     214  else               
     215  {
     216    return(false);
     217  }
    209218}
    210219
Note: See TracChangeset for help on using the changeset viewer.