[Lldb-commits] [PATCH] D110410: [lldb] [Host] Refactor XML converting getters
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 27 03:55:51 PDT 2021
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Host/common/XML.cpp:299-304
+ std::string text;
+ if (GetElementText(text) && llvm::to_integer(text,value, base))
+ return true;
+
+ value = fail_value;
+ return false;
----------------
/me wonders if it would be too weird to rely on the fact that to_integer does not modify the result variable on failure.
It would definitely streamline this code:
```
value = fail_value;
return GetElementText(text) && llvm::to_integer(text,value, base);
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110410/new/
https://reviews.llvm.org/D110410
More information about the lldb-commits
mailing list