Replace Maybe with std::optional
With c++17, std::optional provides the functionality that Maybe
provided.
Bug: 183215655
Test: aapt2_tests
Change-Id: I62bb9c2fa4985dc5217a6ed153df92b85ad9a034
diff --git a/tools/aapt2/process/SymbolTable.h b/tools/aapt2/process/SymbolTable.h
index 06eaf63..65ae7be 100644
--- a/tools/aapt2/process/SymbolTable.h
+++ b/tools/aapt2/process/SymbolTable.h
@@ -56,7 +56,7 @@
struct Symbol {
Symbol() = default;
- explicit Symbol(const Maybe<ResourceId>& i, const std::shared_ptr<Attribute>& attr = {},
+ explicit Symbol(const std::optional<ResourceId>& i, const std::shared_ptr<Attribute>& attr = {},
bool pub = false)
: id(i), attribute(attr), is_public(pub) {
}
@@ -66,7 +66,7 @@
Symbol& operator=(const Symbol&) = default;
Symbol& operator=(Symbol&&) = default;
- Maybe<ResourceId> id;
+ std::optional<ResourceId> id;
std::shared_ptr<Attribute> attribute;
bool is_public = false;
bool is_dynamic = false;