diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
commit | 6adef091b0713941e1149ecf21a5ab6feee3b06d (patch) | |
tree | 92011ccd85a65581c600f63d14c3eb38227cb68c /src/util.cc | |
parent | 902611ac55dbd2c967f244b27c54d37540964c47 (diff) |
Introduce std::string overloads for prt() and c_prt()
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 14 |
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, |