1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "SystemSdk.h"
- #include <algorithm>
- namespace android {
- namespace vintf {
- SystemSdk SystemSdk::removeVersions(const SystemSdk& other) const {
- SystemSdk ret;
- std::set_difference(versions().begin(), versions().end(), other.versions().begin(),
- other.versions().end(), std::inserter(ret.mVersions, ret.mVersions.end()));
- return ret;
- }
- bool SystemSdk::operator==(const SystemSdk& other) const {
- return versions() == other.versions();
- }
- void SystemSdk::addAll(SystemSdk* other) {
- mVersions.insert(other->mVersions.begin(), other->mVersions.end());
- other->mVersions.clear();
- }
- }
- }
|