From c84490dd6fb5d1e85482c2271e00cb768bae410e Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Wed, 5 Oct 2016 18:45:08 +0200 Subject: Change ability_type::{name, desc, action_desc} to std::string --- src/squelch/condition.cc | 4 +--- src/squelch/tree_printer.cc | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/squelch') 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 -- cgit v1.2.3