diff options
Diffstat (limited to 'cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp')
-rw-r--r-- | cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp index a93202a64d31..3037a791328e 100644 --- a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp +++ b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp @@ -100,10 +100,9 @@ void PrettyPrintVisitor::visit(const IdmapData& data) { stream_ << TAB << base::StringPrintf("0x%08x -> ", target_entry.target_id) << utils::DataTypeToString(target_entry.value.data_type); - size_t unused; if (target_entry.value.data_type == Res_value::TYPE_STRING) { - auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset, &unused); - stream_ << " \"" << StringPiece16(str) << "\""; + auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset); + stream_ << " \"" << str.value_or(StringPiece16(u"")) << "\""; } else { stream_ << " " << base::StringPrintf("0x%08x", target_entry.value.data_value); } |