From bd2e96ea837beb5e54f50dd4fedbb247e5ccd1a1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 20 May 2017 03:37:57 +0300 Subject: code style --- include/pdb/address.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/pdb') diff --git a/include/pdb/address.hpp b/include/pdb/address.hpp index 33e0ac3..4a62249 100644 --- a/include/pdb/address.hpp +++ b/include/pdb/address.hpp @@ -20,4 +20,12 @@ namespace pdb oss << std::hex << std::showbase << address; return oss.str(); } + + inline bool parse_address(Address& dest, const std::string& src) + { + std::istringstream iss{src}; + iss >> std::hex; + char c; + return iss >> dest && !iss.get(c); + } } -- cgit v1.2.3