summaryrefslogtreecommitdiff
path: root/tools/aapt2/Source.h
diff options
context:
space:
mode:
author Ryan Mitchell <rtmitchell@google.com> 2021-07-14 12:53:01 -0700
committer Ryan Mitchell <rtmitchell@google.com> 2021-07-15 13:42:13 -0700
commit4382e44c42d2a1edf92a9ef11dbf34843025e64f (patch)
treef4b2855b1df909e526a298300ee55f79a65ccc79 /tools/aapt2/Source.h
parent3947c9b56c2e79d76b6941fb5bdcdf25e359b0a4 (diff)
Replace Maybe with std::optional
With c++17, std::optional provides the functionality that Maybe provided. Bug: 183215655 Test: aapt2_tests Change-Id: I62bb9c2fa4985dc5217a6ed153df92b85ad9a034
Diffstat (limited to 'tools/aapt2/Source.h')
-rw-r--r--tools/aapt2/Source.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/aapt2/Source.h b/tools/aapt2/Source.h
index 92934c343960..4f9369a5d517 100644
--- a/tools/aapt2/Source.h
+++ b/tools/aapt2/Source.h
@@ -17,21 +17,20 @@
#ifndef AAPT_SOURCE_H
#define AAPT_SOURCE_H
+#include <optional>
#include <ostream>
#include <string>
#include "android-base/stringprintf.h"
#include "androidfw/StringPiece.h"
-#include "util/Maybe.h"
-
namespace aapt {
// Represents a file on disk. Used for logging and showing errors.
struct Source {
std::string path;
- Maybe<size_t> line;
- Maybe<std::string> archive;
+ std::optional<size_t> line;
+ std::optional<std::string> archive;
Source() = default;