diff options
author | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 03:30:55 +0000 |
---|---|---|
committer | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 03:30:55 +0000 |
commit | 77b5cadac636ddee4ed39bcaf1344c270fcaa447 (patch) | |
tree | 909c1ce1e1fa67eb83548c97790da2287c4d01e1 /crawl-ref/source/store.cc | |
parent | de978e5fed84aaa1b077fed70b93eba1a3d82edc (diff) | |
download | crawl-ref-77b5cadac636ddee4ed39bcaf1344c270fcaa447.tar.gz crawl-ref-77b5cadac636ddee4ed39bcaf1344c270fcaa447.zip |
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
Diffstat (limited to 'crawl-ref/source/store.cc')
-rw-r--r-- | crawl-ref/source/store.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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 |