diff options
| author | Petr Machata <[email protected]> | 2011-04-19 13:29:03 +0200 |
|---|---|---|
| committer | Petr Machata <[email protected]> | 2011-04-19 13:29:03 +0200 |
| commit | 3ff1c04ed82c2ced1ed7ad51666bbddc0bd70a8f (patch) | |
| tree | d39993a31bbe6f4d8163a023c91d1e914a5c2df5 /dwarflint/locus.cc | |
| parent | 8e24ba6ab4a83318dd9db821cb80a1bef934699d (diff) | |
dwarflint: Add comments to locus.hh, simple_locus helpers now in namespace
Diffstat (limited to 'dwarflint/locus.cc')
| -rw-r--r-- | dwarflint/locus.cc | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/dwarflint/locus.cc b/dwarflint/locus.cc index 8109e3c6..19efd1a6 100644 --- a/dwarflint/locus.cc +++ b/dwarflint/locus.cc @@ -27,12 +27,28 @@ #include "section_id.hh" #include <sstream> +char const * +locus_simple_fmt::offset_n () +{ + return "offset"; +} + +void +locus_simple_fmt::hex (std::ostream &ss, uint64_t off) +{ + ss << "0x" << std::hex << off; +} + +void +locus_simple_fmt::dec (std::ostream &ss, uint64_t off) +{ + ss << std::dec << off; +} + std::string -format_simple_locus (char const *(*N) (), - void (*F) (std::ostream &, uint64_t), - bool brief, - section_id sec, - uint64_t off) +simple_locus_aux::format_simple_locus (char const *(*N) (), + void (*F) (std::ostream &, uint64_t), + bool brief, section_id sec, uint64_t off) { std::stringstream ss; if (!brief) |
