void World::checkForResize(std::size_t amountOfEntitiesToBeAllocated) { auto newSize = getEntityCount() + amountOfEntitiesToBeAllocated; if(newSize > m_entityIdPool.getSize()) { resize(newSize); } }
std::string _tagXMLEntitys::entity2Ref( const char* str ) { std::string ret; if( str ) { int nEntityCount = getEntityCount(str); if( nEntityCount == 0 ) return std::string(str); int len = (int)_tcslen(str) + nEntityCount*10 ; //char* sbuf = s.GetBufferSetLength( len+1 ); //if( sbuf ) char* sbuf = new char[len+1]; entity2Ref( str, sbuf, len ); ret.assign( sbuf ); delete[] sbuf; } return ret; }