diff options
author | Yang Ni <yangni@google.com> | 2015-02-14 18:00:59 -0800 |
---|---|---|
committer | Yang Ni <yangni@google.com> | 2015-02-15 20:10:40 +0000 |
commit | b8353c5943f4038fd7f08db3d958390ce9418798 (patch) | |
tree | 2cfac49d1f790e077f40dfc7ba42904ee5658f50 /rsType.cpp | |
parent | 1ce0dfd82311d4922dbffdde302599410fc25c5d (diff) | |
download | rs-b8353c5943f4038fd7f08db3d958390ce9418798.tar.gz |
Revert "Replaced android::Vector with std::vector."
b/19148482
This reverts commit 93d6bc872b7d9fba63abfa7513d56b38d9c3d371.
I also made some changes to Make it work with HEAD.
Change-Id: I5e516976ec1d85ffe1cf388c01795348a9441982
Diffstat (limited to 'rsType.cpp')
-rw-r--r-- | rsType.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -33,14 +33,10 @@ Type::Type(Context *rsc) : ObjectBase(rsc) { } void Type::preDestroy() const { - auto &types = mRSC->mStateType.mTypes; - - for (auto typeIter = types.begin(), endIter = types.end(); - typeIter != endIter; typeIter++) { - - if (this == *typeIter) { - types.erase(typeIter); - return; + for (uint32_t ct = 0; ct < mRSC->mStateType.mTypes.size(); ct++) { + if (mRSC->mStateType.mTypes[ct] == this) { + mRSC->mStateType.mTypes.removeAt(ct); + break; } } } @@ -291,7 +287,7 @@ ObjectBaseRef<Type> Type::getTypeRef(Context *rsc, const Element *e, nt->compute(); ObjectBase::asyncLock(); - stc->mTypes.push_back(nt); + stc->mTypes.push(nt); ObjectBase::asyncUnlock(); return returnRef; |