summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:14 +0200
commit6adef091b0713941e1149ecf21a5ab6feee3b06d (patch)
tree92011ccd85a65581c600f63d14c3eb38227cb68c /src/util.cc
parent902611ac55dbd2c967f244b27c54d37540964c47 (diff)
Introduce std::string overloads for prt() and c_prt()
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/util.cc b/src/util.cc
index d9805f47..d899b2f2 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -2002,16 +2002,20 @@ void c_prt(byte attr, cptr str, int row, int col)
Term_addstr( -1, attr, str);
}
-/*
-* As above, but in "white"
-*/
+void c_prt(byte attr, std::string const &s, int row, int col)
+{
+ c_prt(attr, s.c_str(), row, col);
+}
+
void prt(cptr str, int row, int col)
{
- /* Spawn */
c_prt(TERM_WHITE, str, row, col);
}
-
+void prt(std::string const &s, int row, int col)
+{
+ prt(s.c_str(), row, col);
+}
/*
* Print some (colored) text to the screen at the current cursor position,