From 8ba172496400cc74a2fa7d343d9859339f1a0f5d Mon Sep 17 00:00:00 2001 From: pauldubois Date: Mon, 17 Mar 2008 05:54:42 +0000 Subject: Cleanup/refactoring of tags.cc. No functional changes. I've been running with and without this patch applied for about a week, and none of my saves have broken, so I'm ready to commit it. - Tag system no longer uses one big (shared!) global buffer. This was the original impetus behind the change... - Change every use of tagHeader into reader or writer (touches a lot). - Split tagHeader into two classes: reader and writer. Turns out every place that used tagHeader only cared about reading or writing and not about tags at all. There was nothing left in tagHeader, so it disappeared along with a bunch of grotty special-case code. - Not done: merge the files.cc read/writeThing code with the tags.cc marshall/unmarshallThing code. This patch is big enough already. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3685 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/externs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/externs.h') diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index c4fb8497b0..8c7816d79f 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1293,7 +1293,8 @@ struct map_cell }; class map_marker; -struct tagHeader; +class reader; +class writer; class map_markers { public: @@ -1317,8 +1318,8 @@ public: const std::string &key); void clear(); - void write(tagHeader &th) const; - void read(tagHeader &); + void write(writer &) const; + void read(reader &); private: typedef std::multimap dgn_marker_map; -- cgit v1.2.3-54-g00ecf