diff options
author | Adam Lesinski <adamlesinski@google.com> | 2016-10-21 17:56:45 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2016-10-26 19:30:23 -0700 |
commit | ce5e56e243d262a9b65459c3bd0bb9eaadd40628 (patch) | |
tree | cf0ecea98883d090d8d2856fc6d32046c7e3d9e8 /tools/aapt2/SdkConstants.cpp | |
parent | 0f7cc4dc2c49a30c072cbc7aa6c0c5d5c31496d4 (diff) |
AAPT2: Rename to match new style
Use Google3 naming style to match new
projects' and open source google projects' style.
Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.
Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
Diffstat (limited to 'tools/aapt2/SdkConstants.cpp')
-rw-r--r-- | tools/aapt2/SdkConstants.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt2/SdkConstants.cpp b/tools/aapt2/SdkConstants.cpp index 75375da33458..c7f920ac6c58 100644 --- a/tools/aapt2/SdkConstants.cpp +++ b/tools/aapt2/SdkConstants.cpp @@ -48,17 +48,17 @@ static const std::vector<std::pair<uint16_t, size_t>> sAttrIdMap = { {0x04ce, SDK_LOLLIPOP}, }; -static bool lessEntryId(const std::pair<uint16_t, size_t>& p, +static bool less_entry_id(const std::pair<uint16_t, size_t>& p, uint16_t entryId) { return p.first < entryId; } -size_t findAttributeSdkLevel(const ResourceId& id) { - if (id.packageId() != 0x01 && id.typeId() != 0x01) { +size_t FindAttributeSdkLevel(const ResourceId& id) { + if (id.package_id() != 0x01 && id.type_id() != 0x01) { return 0; } auto iter = std::lower_bound(sAttrIdMap.begin(), sAttrIdMap.end(), - id.entryId(), lessEntryId); + id.entry_id(), less_entry_id); if (iter == sAttrIdMap.end()) { return SDK_LOLLIPOP_MR1; } @@ -727,7 +727,7 @@ static const std::unordered_map<std::string, size_t> sAttrMap = { {"windowActivityTransitions", 21}, {"colorEdgeEffect", 21}}; -size_t findAttributeSdkLevel(const ResourceName& name) { +size_t FindAttributeSdkLevel(const ResourceName& name) { if (name.package != "android" && name.type != ResourceType::kAttr) { return 0; } @@ -739,7 +739,7 @@ size_t findAttributeSdkLevel(const ResourceName& name) { return SDK_LOLLIPOP_MR1; } -std::pair<StringPiece, int> getDevelopmentSdkCodeNameAndVersion() { +std::pair<StringPiece, int> GetDevelopmentSdkCodeNameAndVersion() { return std::make_pair(StringPiece(sDevelopmentSdkCodeName), sDevelopmentSdkLevel); } |