summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/quiver.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-06-20 00:28:11 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-06-20 20:27:49 +0200
commita201159a83c15d2e9d3d027423162acab391cba0 (patch)
tree0634bce04097fcd45e82566d1e507c05340c278f /crawl-ref/source/quiver.cc
parent239738eefd7df21b8298966c3f2194510dfe899a (diff)
downloadcrawl-ref-a201159a83c15d2e9d3d027423162acab391cba0.tar.gz
crawl-ref-a201159a83c15d2e9d3d027423162acab391cba0.zip
s/marshallLong/marshallInt/, since this confusion tends to cause bugs.
Actually, it should be named marshallInt32_t as that's what it does, but that's hard to read, no architecture with smaller ints can conceivably run Crawl and the only architecture with bigger ints is long dead. And in even in such a case, everything will be fine except for name confusion...
Diffstat (limited to 'crawl-ref/source/quiver.cc')
-rw-r--r--crawl-ref/source/quiver.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/quiver.cc b/crawl-ref/source/quiver.cc
index 25af82708c..0feb4e15da 100644
--- a/crawl-ref/source/quiver.cc
+++ b/crawl-ref/source/quiver.cc
@@ -450,8 +450,8 @@ void player_quiver::save(writer& outf) const
marshallShort(outf, QUIVER_COOKIE);
marshallItem(outf, m_last_weapon);
- marshallLong(outf, m_last_used_type);
- marshallLong(outf, ARRAYSZ(m_last_used_of_type));
+ marshallInt(outf, m_last_used_type);
+ marshallInt(outf, ARRAYSZ(m_last_used_of_type));
for (unsigned int i = 0; i < ARRAYSZ(m_last_used_of_type); i++)
marshallItem(outf, m_last_used_of_type[i]);
@@ -463,10 +463,10 @@ void player_quiver::load(reader& inf)
ASSERT(cooky == QUIVER_COOKIE); (void)cooky;
unmarshallItem(inf, m_last_weapon);
- m_last_used_type = (ammo_t)unmarshallLong(inf);
+ m_last_used_type = (ammo_t)unmarshallInt(inf);
ASSERT(m_last_used_type >= AMMO_THROW && m_last_used_type < NUM_AMMO);
- const unsigned long count = unmarshallLong(inf);
+ const unsigned long count = unmarshallInt(inf);
ASSERT(count <= ARRAYSZ(m_last_used_of_type));
for (unsigned int i = 0; i < count; i++)