diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 22:50:06 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 23:06:30 +0200 |
commit | 770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch) | |
tree | e030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/attitude-change.cc | |
parent | a6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff) | |
download | crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.tar.gz crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.zip |
Use std namespace.
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
Diffstat (limited to 'crawl-ref/source/attitude-change.cc')
-rw-r--r-- | crawl-ref/source/attitude-change.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc index 34373da50f..a663af81ac 100644 --- a/crawl-ref/source/attitude-change.cc +++ b/crawl-ref/source/attitude-change.cc @@ -61,7 +61,7 @@ void good_god_follower_attitude_change(monster* mons) { msg::stream << mons->name(DESC_THE) << " glares at your weapon." - << std::endl; + << endl; _good_god_holy_fail_attitude_change(mons); return; } @@ -104,7 +104,7 @@ void beogh_follower_convert(monster* mons, bool orc_hit) { msg::stream << mons->name(DESC_THE) << " flinches from your weapon." - << std::endl; + << endl; return; } beogh_convert_orc(mons, orc_hit); @@ -275,7 +275,7 @@ bool beogh_followers_abandon_you() simple_god_message("'s voice booms out, \"Who do you think you " "are?\"", GOD_BEOGH); - std::ostream& chan = msg::streams(MSGCH_MONSTER_ENCHANT); + ostream& chan = msg::streams(MSGCH_MONSTER_ENCHANT); if (num_reconvert > 0) { @@ -287,7 +287,7 @@ bool beogh_followers_abandon_you() chan << "Some of your followers decide to abandon you."; } - chan << std::endl; + chan << endl; return true; } @@ -296,17 +296,17 @@ bool beogh_followers_abandon_you() } static void _print_good_god_holy_being_speech(bool neutral, - const std::string key, + const string key, monster* mon, msg_channel_type channel) { - std::string full_key = "good_god_"; + string full_key = "good_god_"; if (!neutral) full_key += "non"; full_key += "neutral_holy_being_"; full_key += key; - std::string msg = getSpeakString(full_key); + string msg = getSpeakString(full_key); if (!msg.empty()) { @@ -367,11 +367,11 @@ static void _good_god_holy_fail_attitude_change(monster* holy) } } -static void _print_converted_orc_speech(const std::string key, +static void _print_converted_orc_speech(const string key, monster* mon, msg_channel_type channel) { - std::string msg = getSpeakString("beogh_converted_orc_" + key); + string msg = getSpeakString("beogh_converted_orc_" + key); if (!msg.empty()) { @@ -432,7 +432,7 @@ void beogh_convert_orc(monster* orc, bool emergency, } if (!orc->alive()) - orc->hit_points = std::min(random_range(1, 4), orc->max_hit_points); + orc->hit_points = min(random_range(1, 4), orc->max_hit_points); // Avoid immobile "followers". behaviour_event(orc, ME_ALERT); |