summaryrefslogtreecommitdiff
path: root/rsType.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rsType.cpp')
-rw-r--r--rsType.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/rsType.cpp b/rsType.cpp
index 39c91cdc..d45de2de 100644
--- a/rsType.cpp
+++ b/rsType.cpp
@@ -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;