AbstractThreadLocal::_AbstractData* AbstractThreadLocal::_Provider::getData(unsigned index) { ThreadLocalVector& tlsVector = _tlsVector(); if (tlsVector.size() <= index) return 0; return tlsVector[index]; }
void AbstractThreadLocal::_Provider::setData(unsigned index, AbstractThreadLocal::_AbstractData* abstractThreadLocal) { ThreadLocalVector& tlsVector = _tlsVector(); if (tlsVector.size() <= index) tlsVector.resize(index + 1, 0); delete tlsVector[index]; tlsVector[index] = abstractThreadLocal; }
void AbstractThreadLocal::_Provider::setData(unsigned index, AbstractThreadLocal::_AbstractData* abstractThreadLocal) { ThreadLocalVector* tlsVector = _tlsVector(); if (!tlsVector) return; if (tlsVector->size() <= index) tlsVector->resize(index + 1, 0); delete (*tlsVector)[index]; (*tlsVector)[index] = abstractThreadLocal; }