summaryrefslogtreecommitdiff
path: root/src/squelch
diff options
context:
space:
mode:
Diffstat (limited to 'src/squelch')
-rw-r--r--src/squelch/condition.cc4
-rw-r--r--src/squelch/tree_printer.cc5
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