blob: 0ee0bf35457dbac05faba3104ac8ddd880465296 [file] [log] [blame]
Adam Lesinskie78fd612015-10-22 12:48:43 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef AAPT_UTIL_COMPARATORS_H
18#define AAPT_UTIL_COMPARATORS_H
19
Adam Lesinskib274e352015-11-06 15:14:35 -080020#include "ConfigDescription.h"
21#include "ResourceTable.h"
22
Adam Lesinskie78fd612015-10-22 12:48:43 -070023namespace aapt {
24namespace cmp {
25
Adam Lesinskib274e352015-11-06 15:14:35 -080026inline bool lessThanConfig(const ResourceConfigValue& a, const ConfigDescription& b) {
Adam Lesinskie78fd612015-10-22 12:48:43 -070027 return a.config < b;
28}
29
Adam Lesinskib274e352015-11-06 15:14:35 -080030inline bool lessThanType(const std::unique_ptr<ResourceTableType>& a, ResourceType b) {
31 return a->type < b;
32}
33
Adam Lesinskie78fd612015-10-22 12:48:43 -070034} // namespace cmp
35} // namespace aapt
36
37#endif /* AAPT_UTIL_COMPARATORS_H */