summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 06:57:42 +0000
committerpauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-10 06:57:42 +0000
commitdd916b6a6dc736d18f47428be0694479714e3dfe (patch)
tree28fa2fa42448676a6e4c6590b5d0a0f98013395e /crawl-ref
parenta9660d4b470b45a78bb6ca024c397c70a52e61ab (diff)
downloadcrawl-ref-dd916b6a6dc736d18f47428be0694479714e3dfe.tar.gz
crawl-ref-dd916b6a6dc736d18f47428be0694479714e3dfe.zip
Fix some more compile warnings that look like they were pointing out bugs.
(don't compare bool to int; don't << a variable number of bits) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3575 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/monstuff.cc4
-rw-r--r--crawl-ref/source/mstuff2.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index ff3bbb9a45..b3bb6100cc 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -124,7 +124,7 @@ void get_mimic_item( const monsters *mimic, item_def &item )
// Override special - this could cause a "bad" (no-properties)
// randart, but we only need the name anyway. We have to
// do this in order to get a consistent name for the mimic item.
- item.special = ((mimic->x << 8 + mimic->y) & RANDART_SEED_MASK);
+ item.special = (((mimic->x << 8) + mimic->y) & RANDART_SEED_MASK);
}
else if (prop < 50)
set_equip_desc( item, ISFLAG_GLOWING );
@@ -148,7 +148,7 @@ void get_mimic_item( const monsters *mimic, item_def &item )
{
make_item_randart(item);
// See comment above for randart weapon mimics.
- item.special = ((mimic->x << 8 + mimic->y) & RANDART_SEED_MASK);
+ item.special = (((mimic->x << 8) + mimic->y) & RANDART_SEED_MASK);
}
else if (prop < 40)
set_equip_desc( item, ISFLAG_GLOWING );
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index d94e7c662c..6701979ab7 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -2195,7 +2195,7 @@ static int monster_abjure_square(const coord_def &pos,
return (0);
monsters *target = &menv[mindex];
- if (!target->alive() || friendly == mons_friendly(target))
+ if (!target->alive() || ((bool)friendly == mons_friendly(target)))
return (0);
mon_enchant abj = target->get_ench(ENCH_ABJ);