diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-06-20 00:28:11 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-06-20 20:27:49 +0200 |
commit | a201159a83c15d2e9d3d027423162acab391cba0 (patch) | |
tree | 0634bce04097fcd45e82566d1e507c05340c278f /crawl-ref/source/mapmark.cc | |
parent | 239738eefd7df21b8298966c3f2194510dfe899a (diff) | |
download | crawl-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/mapmark.cc')
-rw-r--r-- | crawl-ref/source/mapmark.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc index 80fc0c7199..bf94ef8760 100644 --- a/crawl-ref/source/mapmark.cc +++ b/crawl-ref/source/mapmark.cc @@ -815,7 +815,7 @@ void map_markers::clear() static const long MARKERS_COOKY = 0x17742C32; void map_markers::write(writer &outf) const { - marshallLong(outf, MARKERS_COOKY); + marshallInt(outf, MARKERS_COOKY); std::vector<unsigned char> buf; @@ -828,7 +828,7 @@ void map_markers::write(writer &outf) const i->second->write(tmp_outf); // Write the marker data, prefixed by a size - marshallLong(outf, buf.size()); + marshallInt(outf, buf.size()); for ( std::vector<unsigned char>::const_iterator bi = buf.begin(); bi != buf.end(); ++bi ) { @@ -843,7 +843,7 @@ void map_markers::read(reader &inf, int minorVersion) clear(); - const long cooky = unmarshallLong(inf); + const int cooky = unmarshallInt(inf); ASSERT(cooky == MARKERS_COOKY); UNUSED(cooky); @@ -851,7 +851,7 @@ void map_markers::read(reader &inf, int minorVersion) for (int i = 0; i < nmarkers; ++i) { // used by tools - unmarshallLong(inf); + unmarshallInt(inf); if (map_marker *mark = map_marker::read_marker(inf)) { add(mark); |