summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-goditem.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-28 23:33:32 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-29 01:07:35 +0100
commit5f4ae1ef05d92d9da03cde00b07d187f2f53a06d (patch)
tree01dbc85606ad5ab882333b1695c915b63e97b96d /crawl-ref/source/spl-goditem.cc
parent2965f04181dcb6530b93acb194ba5f7561d8adc9 (diff)
downloadcrawl-ref-5f4ae1ef05d92d9da03cde00b07d187f2f53a06d.tar.gz
crawl-ref-5f4ae1ef05d92d9da03cde00b07d187f2f53a06d.zip
Replace `mpr(s, ch)` with `mprf(ch, s)`
Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
Diffstat (limited to 'crawl-ref/source/spl-goditem.cc')
-rw-r--r--crawl-ref/source/spl-goditem.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-goditem.cc b/crawl-ref/source/spl-goditem.cc
index 988917dbc6..27a56a1759 100644
--- a/crawl-ref/source/spl-goditem.cc
+++ b/crawl-ref/source/spl-goditem.cc
@@ -420,19 +420,19 @@ void antimagic()
if (you.duration[DUR_TELEPORT] > 0)
{
you.duration[DUR_TELEPORT] = 0;
- mpr("You feel strangely stable.", MSGCH_DURATION);
+ mprf(MSGCH_DURATION, "You feel strangely stable.");
}
if (you.duration[DUR_PETRIFYING] > 0)
{
you.duration[DUR_PETRIFYING] = 0;
- mpr("You feel limber!", MSGCH_DURATION);
+ mprf(MSGCH_DURATION, "You feel limber!");
}
if (you.attribute[ATTR_DELAYED_FIREBALL])
{
you.attribute[ATTR_DELAYED_FIREBALL] = 0;
- mpr("Your charged fireball dissipates.", MSGCH_DURATION);
+ mprf(MSGCH_DURATION, "Your charged fireball dissipates.");
}
if (you.attribute[ATTR_SWIFTNESS] > 0)
@@ -689,7 +689,7 @@ bool remove_curse(bool alreadyknown, string *pre_msg)
learned_something_new(HINT_REMOVED_CURSE);
}
else if (alreadyknown)
- mpr("None of your equipped items are cursed.", MSGCH_PROMPT);
+ mprf(MSGCH_PROMPT, "None of your equipped items are cursed.");
else
{
if (pre_msg)