diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-04-21 16:01:17 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-04-21 16:01:17 +0200 |
commit | 30de546be99096a9092a377691a47ccbcbaa60eb (patch) | |
tree | f64b440b59fbd252562efd02d5d0a8dc872a65e8 /crawl-ref/source/mon-transit.cc | |
parent | 846770870d30581284157885f21080bddaede2ba (diff) | |
download | crawl-ref-30de546be99096a9092a377691a47ccbcbaa60eb.tar.gz crawl-ref-30de546be99096a9092a377691a47ccbcbaa60eb.zip |
dprf()ize a number of #ifdef ... mprf(MSGCH_DIAGNOSTICS).
There's no cost for costly functions like name() anymore -- but remember,
if a dprf() had a side effect before, it did happen, but now it won't outside
of debug builds.
I skipped anything even remotely related to combat code, to avoid making
the combat overhaul merge any worse.
Diffstat (limited to 'crawl-ref/source/mon-transit.cc')
-rw-r--r-- | crawl-ref/source/mon-transit.cc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/crawl-ref/source/mon-transit.cc b/crawl-ref/source/mon-transit.cc index 696cb69249..4d10c06a41 100644 --- a/crawl-ref/source/mon-transit.cc +++ b/crawl-ref/source/mon-transit.cc @@ -112,10 +112,7 @@ void add_monster_to_transit(const level_id &lid, const monster& m) m_transit_list &mlist = the_lost_ones[lid]; mlist.push_back(m); -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Monster in transit: %s", - m.name(DESC_PLAIN).c_str()); -#endif + dprf("Monster in transit: %s", m.name(DESC_PLAIN).c_str()); const int how_many = mlist.size(); if (how_many > MAX_LOST) @@ -146,10 +143,7 @@ void place_followers() static bool place_lost_monster(follower &f) { -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Placing lost one: %s", - f.mons.name(DESC_PLAIN).c_str()); -#endif + dprf("Placing lost one: %s", f.mons.name(DESC_PLAIN).c_str()); return (f.place(false)); } @@ -185,10 +179,7 @@ void add_item_to_transit(const level_id &lid, const item_def &i) i_transit_list &ilist = transiting_items[lid]; ilist.push_back(i); -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Item in transit: %s", - i.name(DESC_PLAIN).c_str()); -#endif + dprf("Item in transit: %s", i.name(DESC_PLAIN).c_str()); const int how_many = ilist.size(); if (how_many > MAX_LOST) @@ -277,10 +268,7 @@ bool follower::place(bool near_player) if (placed) { -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Placed follower: %s", - m.name(DESC_PLAIN).c_str()); -#endif + dprf("Placed follower: %s", m.name(DESC_PLAIN).c_str()); m.target.reset(); m.flags &= ~MF_TAKING_STAIRS; |