diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-28 23:33:32 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-29 01:07:35 +0100 |
commit | 5f4ae1ef05d92d9da03cde00b07d187f2f53a06d (patch) | |
tree | 01dbc85606ad5ab882333b1695c915b63e97b96d /crawl-ref/source/wiz-dgn.cc | |
parent | 2965f04181dcb6530b93acb194ba5f7561d8adc9 (diff) | |
download | crawl-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/wiz-dgn.cc')
-rw-r--r-- | crawl-ref/source/wiz-dgn.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc index 6e9526a9cd..26e3e66b99 100644 --- a/crawl-ref/source/wiz-dgn.cc +++ b/crawl-ref/source/wiz-dgn.cc @@ -209,7 +209,7 @@ void wizard_interlevel_travel() bool wizard_create_portal(const coord_def& pos) { - mpr("Destination for portal:", MSGCH_PROMPT); + mprf(MSGCH_PROMPT, "Destination for portal:"); string dummy; level_id dest = prompt_translevel_target(TPF_ALLOW_UPDOWN @@ -240,9 +240,9 @@ bool wizard_create_feature(const coord_def& pos) char specs[256]; dungeon_feature_type feat; if (mimic) - mpr("Create what kind of feature mimic? ", MSGCH_PROMPT); + mprf(MSGCH_PROMPT, "Create what kind of feature mimic? "); else - mpr("Create which feature? ", MSGCH_PROMPT); + mprf(MSGCH_PROMPT, "Create which feature? "); if (cancellable_get_line(specs, sizeof(specs)) || specs[0] == 0) { @@ -356,8 +356,8 @@ void wizard_list_branches() if (!you.props.exists(OVERFLOW_TEMPLES_KEY)) return; - mpr("----", MSGCH_DIAGNOSTICS); - mpr("Overflow temples: ", MSGCH_DIAGNOSTICS); + mprf(MSGCH_DIAGNOSTICS, "----"); + mprf(MSGCH_DIAGNOSTICS, "Overflow temples: "); CrawlVector &levels = you.props[OVERFLOW_TEMPLES_KEY].get_vector(); |