diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:45:08 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-10-05 18:45:08 +0200 |
commit | c84490dd6fb5d1e85482c2271e00cb768bae410e (patch) | |
tree | c2043c4f418f7565c911b88d6aa926d4b3747230 /src/squelch | |
parent | dd76070a7d8676a5f13dcc91fc7ed2eb2639d9df (diff) |
Change ability_type::{name, desc, action_desc} to std::string
Diffstat (limited to 'src/squelch')
-rw-r--r-- | src/squelch/condition.cc | 4 | ||||
-rw-r--r-- | src/squelch/tree_printer.cc | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc index 7c01c4cd..09535c53 100644 --- a/src/squelch/condition.cc +++ b/src/squelch/condition.cc @@ -942,10 +942,8 @@ void AbilityCondition::write_tree(TreePrinter *p, Cursor *, uint8_t ecol, uint8_ { auto const &ab_info = game->edit_data.ab_info; - cptr ability_s = ab_info[m_ability_idx].name; - p->write(ecol, "You have the "); - p->write(bcol, ability_s); + p->write(bcol, ab_info[m_ability_idx].name); p->write(ecol, " ability"); p->write(TERM_WHITE, "\n"); } diff --git a/src/squelch/tree_printer.cc b/src/squelch/tree_printer.cc index 2be098dc..0dbceec9 100644 --- a/src/squelch/tree_printer.cc +++ b/src/squelch/tree_printer.cc @@ -86,4 +86,9 @@ void TreePrinter::write(uint8_t color, cptr line) } } +void TreePrinter::write(uint8_t color, std::string const &line) +{ + write(color, line.c_str()); +} + } // namespace |