idmap2: switch to improved Result class
Remove the old std::optional based Result class, replace uses with the
new std::variant based Result class.
Test: make idmap2_tests
Change-Id: I401cb36e5af06133a2872d835cf29bfb0b106597
diff --git a/cmds/idmap2/libidmap2/RawPrintVisitor.cpp b/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
index b78e942..1149c90 100644
--- a/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
+++ b/cmds/idmap2/libidmap2/RawPrintVisitor.cpp
@@ -75,7 +75,7 @@
type_entry.GetEntryOffset() + i);
const ResourceId overlay_resid =
RESID(last_seen_package_id_, type_entry.GetOverlayTypeId(), entry);
- Result<std::string> name;
+ Result<std::string> name(Error(""));
if (target_package_loaded) {
name = utils::ResToTypeEntryName(target_am_, target_resid);
}