diff options
| author | Chris Wailes <chriswailes@google.com> | 2014-07-28 16:54:38 -0700 |
|---|---|---|
| committer | Chris Wailes <chriswailes@google.com> | 2014-08-18 15:12:32 -0700 |
| commit | 93d6bc872b7d9fba63abfa7513d56b38d9c3d371 (patch) | |
| tree | 0a99fbd58c3254f82ffa1600f653aeac81c55d03 /rsDevice.cpp | |
| parent | 70d4971878444fe7cf4263998b0c3f46e2b6c71f (diff) | |
| download | android_frameworks_rs-93d6bc872b7d9fba63abfa7513d56b38d9c3d371.tar.gz android_frameworks_rs-93d6bc872b7d9fba63abfa7513d56b38d9c3d371.tar.bz2 android_frameworks_rs-93d6bc872b7d9fba63abfa7513d56b38d9c3d371.zip | |
Replaced android::Vector with std::vector.
Change-Id: I4c6abd964dc4b1412ec2e592fc8e835fecfe53f6
Diffstat (limited to 'rsDevice.cpp')
| -rw-r--r-- | rsDevice.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/rsDevice.cpp b/rsDevice.cpp index 2688890b..1ba005a2 100644 --- a/rsDevice.cpp +++ b/rsDevice.cpp @@ -28,14 +28,16 @@ Device::~Device() { } void Device::addContext(Context *rsc) { - mContexts.push(rsc); + mContexts.push_back(rsc); } void Device::removeContext(Context *rsc) { - for (size_t idx=0; idx < mContexts.size(); idx++) { - if (mContexts[idx] == rsc) { - mContexts.removeAt(idx); - break; + for (auto ctxIter = mContexts.begin(), endIter = mContexts.end(); + ctxIter != endIter; ctxIter++) { + + if (rsc == *ctxIter) { + mContexts.erase(ctxIter); + return; } } } @@ -58,4 +60,3 @@ extern "C" void rsDeviceSetConfig(RsDevice dev, RsDeviceParam p, int32_t value) } rsAssert(0); } - |
