From 77b5cadac636ddee4ed39bcaf1344c270fcaa447 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Mon, 10 Mar 2008 03:30:55 +0000 Subject: Batch of tiny changes for MSVC compiles. Most of these fall into the category: - don't use struct to refer to a class, and vice versa - msvc doesn't like unistd.h or dirent.h Doesn't fix all the struct/class problems; I think I'll silence those for now and move on because it's not all that important. Tested on OS X. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3571 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/store.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crawl-ref/source/store.cc') diff --git a/crawl-ref/source/store.cc b/crawl-ref/source/store.cc index 7c01f62431..ecd55b619f 100644 --- a/crawl-ref/source/store.cc +++ b/crawl-ref/source/store.cc @@ -771,6 +771,18 @@ const CrawlStoreValue &CrawlStoreValue::operator ///////////////////// // Typecast operators +#if _MSC_VER +CrawlStoreValue::operator bool&() { return get_bool(); } +CrawlStoreValue::operator char&() { return get_byte(); } +CrawlStoreValue::operator short&() { return get_short(); } +CrawlStoreValue::operator float&() { return get_float(); } +CrawlStoreValue::operator long&() { return get_long(); } +CrawlStoreValue::operator std::string&() { return get_string(); } +CrawlStoreValue::operator coord_def&() { return get_coord(); } +CrawlStoreValue::operator CrawlHashTable&() { return get_table(); } +CrawlStoreValue::operator CrawlVector&() { return get_vector(); } +CrawlStoreValue::operator item_def&() { return get_item(); } +#else &CrawlStoreValue::operator bool() { return get_bool(); @@ -820,6 +832,7 @@ const CrawlStoreValue &CrawlStoreValue::operator { return get_item(); } +#endif /////////////////////////// // Const typecast operators -- cgit v1.2.3-54-g00ecf