aboutsummaryrefslogtreecommitdiff
path: root/reloc_win32.cc
diff options
context:
space:
mode:
authorAnton Bikineev <bikineev@chromium.org>2021-05-15 22:35:36 +0000
committerCopybara-Service <copybara-worker@google.com>2021-07-25 21:14:18 -0700
commit1a96551a279242efef41468357e38d3091e884bc (patch)
tree04fb6730d8927a839d99d24492555b877077317d /reloc_win32.cc
parent147f86be24a5ceb5447a9376fdc8c65044bb2977 (diff)
downloadzucchini-1a96551a279242efef41468357e38d3091e884bc.tar.gz
components: Replace base::Optional and friends with absl counterparts
This replaces: - base::Optional -> absl::optional - include "base/optional.h" -> include "third_party/abseil-cpp/absl/types/optional.h" - base::nullopt -> absl::nullopt - base::make_optional -> absl::make_optional Bug: 1202909 Change-Id: If697b7bf69b199c1796f873eedca3359cdb48c64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897151 Commit-Queue: Anton Bikineev <bikineev@chromium.org> Owners-Override: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#883296} NOKEYCHECK=True GitOrigin-RevId: 1156b5f891de178171e71b9221a96bef1ced3d3b
Diffstat (limited to 'reloc_win32.cc')
-rw-r--r--reloc_win32.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/reloc_win32.cc b/reloc_win32.cc
index 6da48f2..b70aa8a 100644
--- a/reloc_win32.cc
+++ b/reloc_win32.cc
@@ -93,14 +93,14 @@ RelocRvaReaderWin32::RelocRvaReaderWin32(RelocRvaReaderWin32&&) = default;
RelocRvaReaderWin32::~RelocRvaReaderWin32() = default;
// Unrolls a nested loop: outer = reloc blocks and inner = reloc entries.
-base::Optional<RelocUnitWin32> RelocRvaReaderWin32::GetNext() {
+absl::optional<RelocUnitWin32> RelocRvaReaderWin32::GetNext() {
// "Outer loop" to find non-empty reloc block.
while (cur_reloc_units_.Remaining() < kRelocUnitSize) {
if (!LoadRelocBlock(cur_reloc_units_.end()))
- return base::nullopt;
+ return absl::nullopt;
}
if (end_it_ - cur_reloc_units_.begin() < kRelocUnitSize)
- return base::nullopt;
+ return absl::nullopt;
// "Inner loop" to extract single reloc unit.
offset_t location =
base::checked_cast<offset_t>(cur_reloc_units_.begin() - image_.begin());
@@ -144,8 +144,8 @@ RelocReaderWin32::RelocReaderWin32(RelocRvaReaderWin32&& reloc_rva_reader,
RelocReaderWin32::~RelocReaderWin32() = default;
// ReferenceReader:
-base::Optional<Reference> RelocReaderWin32::GetNext() {
- for (base::Optional<RelocUnitWin32> unit = reloc_rva_reader_.GetNext();
+absl::optional<Reference> RelocReaderWin32::GetNext() {
+ for (absl::optional<RelocUnitWin32> unit = reloc_rva_reader_.GetNext();
unit.has_value(); unit = reloc_rva_reader_.GetNext()) {
if (unit->type != reloc_type_)
continue;
@@ -158,7 +158,7 @@ base::Optional<Reference> RelocReaderWin32::GetNext() {
offset_t location = unit->location;
return Reference{location, target};
}
- return base::nullopt;
+ return absl::nullopt;
}
/******** RelocWriterWin32 ********/