summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/store.cc
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-12-29 14:05:06 -0800
committerSteven Noonan <steven@uplinklabs.net>2009-12-29 17:07:38 -0800
commit456c88a32cdf9080e07cc8007cc558c6e4a3812a (patch)
tree432ce0cedc0e63dad138d82d04e16e4e2a63aa5f /crawl-ref/source/store.cc
parent315f93f92a8dc156d2e652990fefbf1e1019c6b5 (diff)
downloadcrawl-ref-456c88a32cdf9080e07cc8007cc558c6e4a3812a.tar.gz
crawl-ref-456c88a32cdf9080e07cc8007cc558c6e4a3812a.zip
store.{cc,h}: remove pointless special case for MSVC
The version currently in use by TARGET_COMPILER_VC only works on GCC, Clang, and MSVC. Why use the other one? Even an objdump output shows there's no difference between the two, except in terms of function naming: --- store.byref.D 2009-12-29 13:59:36.364840900 -0800 +++ store.byval.D 2009-12-29 14:04:29.313840690 -0800 @@ -712,32 +712,32 @@ 57b: 48 03 42 08 add 0x8(%rdx),%rax 57f: c3 retq -0000000000000580 <CrawlStoreValue::operator bool()>: - 580: e9 00 00 00 00 jmpq 585 <CrawlStoreValue::operator bool()+0x5> +0000000000000580 <CrawlStoreValue::operator bool&()>: + 580: e9 00 00 00 00 jmpq 585 <CrawlStoreValue::operator bool&()+0x5> 585: 90 nop 586: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 58d: 00 00 00 -0000000000000590 <CrawlStoreValue::operator char()>: - 590: e9 00 00 00 00 jmpq 595 <CrawlStoreValue::operator char()+0x5> +0000000000000590 <CrawlStoreValue::operator char&()>: + 590: e9 00 00 00 00 jmpq 595 <CrawlStoreValue::operator char&()+0x5> 595: 90 nop 596: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 59d: 00 00 00 -00000000000005a0 <CrawlStoreValue::operator short()>: - 5a0: e9 00 00 00 00 jmpq 5a5 <CrawlStoreValue::operator short()+0x5> +00000000000005a0 <CrawlStoreValue::operator short&()>: + 5a0: e9 00 00 00 00 jmpq 5a5 <CrawlStoreValue::operator short&()+0x5> 5a5: 90 nop 5a6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5ad: 00 00 00 -00000000000005b0 <CrawlStoreValue::operator float()>: - 5b0: e9 00 00 00 00 jmpq 5b5 <CrawlStoreValue::operator float()+0x5> +00000000000005b0 <CrawlStoreValue::operator float&()>: + 5b0: e9 00 00 00 00 jmpq 5b5 <CrawlStoreValue::operator float&()+0x5> 5b5: 90 nop 5b6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5bd: 00 00 00 -00000000000005c0 <CrawlStoreValue::operator long()>: - 5c0: e9 00 00 00 00 jmpq 5c5 <CrawlStoreValue::operator long()+0x5> +00000000000005c0 <CrawlStoreValue::operator long&()>: + 5c0: e9 00 00 00 00 jmpq 5c5 <CrawlStoreValue::operator long&()+0x5> 5c5: 90 nop 5c6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5cd: 00 00 00 @@ -1863,8 +1863,8 @@ 1324: 66 66 66 2e 0f 1f 84 nopw %cs:0x0(%rax,%rax,1) 132b: 00 00 00 00 00 -0000000000001330 <CrawlStoreValue::operator level_pos()>: - 1330: e9 00 00 00 00 jmpq 1335 <CrawlStoreValue::operator level_pos()+0x5> +0000000000001330 <CrawlStoreValue::operator level_pos&()>: + 1330: e9 00 00 00 00 jmpq 1335 <CrawlStoreValue::operator level_pos&()+0x5> 1335: 90 nop 1336: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 133d: 00 00 00 @@ -1982,8 +1982,8 @@ 14bb: 90 nop 14bc: 0f 1f 40 00 nopl 0x0(%rax) -00000000000014c0 <CrawlStoreValue::operator level_id()>: - 14c0: e9 00 00 00 00 jmpq 14c5 <CrawlStoreValue::operator level_id()+0x5> +00000000000014c0 <CrawlStoreValue::operator level_id&()>: + 14c0: e9 00 00 00 00 jmpq 14c5 <CrawlStoreValue::operator level_id&()+0x5> 14c5: 90 nop 14c6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 14cd: 00 00 00 @@ -2090,8 +2090,8 @@ 1612: 66 66 66 66 66 2e 0f nopw %cs:0x0(%rax,%rax,1) 1619: 1f 84 00 00 00 00 00 -0000000000001620 <CrawlStoreValue::operator coord_def()>: - 1620: e9 00 00 00 00 jmpq 1625 <CrawlStoreValue::operator coord_def()+0x5> +0000000000001620 <CrawlStoreValue::operator coord_def&()>: + 1620: e9 00 00 00 00 jmpq 1625 <CrawlStoreValue::operator coord_def&()+0x5> 1625: 90 nop 1626: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 162d: 00 00 00 @@ -2329,8 +2329,8 @@ 1919: 90 nop 191a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) -0000000000001920 <CrawlStoreValue::operator CrawlVector()>: - 1920: e9 00 00 00 00 jmpq 1925 <CrawlStoreValue::operator CrawlVector()+0x5> +0000000000001920 <CrawlStoreValue::operator CrawlVector&()>: + 1920: e9 00 00 00 00 jmpq 1925 <CrawlStoreValue::operator CrawlVector&()+0x5> 1925: 90 nop 1926: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 192d: 00 00 00 @@ -2423,8 +2423,8 @@ 1a56: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1a5d: 00 00 00 -0000000000001a60 <CrawlStoreValue::operator CrawlHashTable()>: - 1a60: e9 00 00 00 00 jmpq 1a65 <CrawlStoreValue::operator CrawlHashTable()+0x5> +0000000000001a60 <CrawlStoreValue::operator CrawlHashTable&()>: + 1a60: e9 00 00 00 00 jmpq 1a65 <CrawlStoreValue::operator CrawlHashTable&()+0x5> 1a65: 90 nop 1a66: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1a6d: 00 00 00 @@ -2566,8 +2566,8 @@ 1c36: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1c3d: 00 00 00 -0000000000001c40 <CrawlStoreValue::operator std::string()>: - 1c40: e9 00 00 00 00 jmpq 1c45 <CrawlStoreValue::operator std::string()+0x5> +0000000000001c40 <CrawlStoreValue::operator std::string&()>: + 1c40: e9 00 00 00 00 jmpq 1c45 <CrawlStoreValue::operator std::string&()+0x5> 1c45: 90 nop 1c46: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1c4d: 00 00 00 @@ -2825,8 +2825,8 @@ 1fed: 90 nop 1fee: 66 90 xchg %ax,%ax -0000000000001ff0 <CrawlStoreValue::operator dlua_chunk()>: - 1ff0: e9 00 00 00 00 jmpq 1ff5 <CrawlStoreValue::operator dlua_chunk()+0x5> +0000000000001ff0 <CrawlStoreValue::operator dlua_chunk&()>: + 1ff0: e9 00 00 00 00 jmpq 1ff5 <CrawlStoreValue::operator dlua_chunk&()+0x5> 1ff5: 90 nop 1ff6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1ffd: 00 00 00 @@ -2979,8 +2979,8 @@ 2206: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 220d: 00 00 00 -0000000000002210 <CrawlStoreValue::operator monsters()>: - 2210: e9 00 00 00 00 jmpq 2215 <CrawlStoreValue::operator monsters()+0x5> +0000000000002210 <CrawlStoreValue::operator monsters&()>: + 2210: e9 00 00 00 00 jmpq 2215 <CrawlStoreValue::operator monsters&()+0x5> 2215: 90 nop 2216: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 221d: 00 00 00 @@ -3120,8 +3120,8 @@ 2448: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 244f: 00 -0000000000002450 <CrawlStoreValue::operator item_def()>: - 2450: e9 00 00 00 00 jmpq 2455 <CrawlStoreValue::operator item_def()+0x5> +0000000000002450 <CrawlStoreValue::operator item_def&()>: + 2450: e9 00 00 00 00 jmpq 2455 <CrawlStoreValue::operator item_def&()+0x5> 2455: 90 nop 2456: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 245d: 00 00 00 The only difference is that the non-TARGET_COMPILER_VC version breaks non-GCC compilers. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/store.cc')
-rw-r--r--crawl-ref/source/store.cc76
1 files changed, 2 insertions, 74 deletions
diff --git a/crawl-ref/source/store.cc b/crawl-ref/source/store.cc
index df8f5b345c..a4afaece9f 100644
--- a/crawl-ref/source/store.cc
+++ b/crawl-ref/source/store.cc
@@ -951,7 +951,6 @@ const CrawlStoreValue &CrawlStoreValue::operator
/////////////////////
// Typecast operators
-#ifdef TARGET_COMPILER_VC
CrawlStoreValue::operator bool&() { return get_bool(); }
CrawlStoreValue::operator char&() { return get_byte(); }
CrawlStoreValue::operator short&() { return get_short(); }
@@ -964,79 +963,8 @@ CrawlStoreValue::operator CrawlVector&() { return get_vector(); }
CrawlStoreValue::operator item_def&() { return get_item(); }
CrawlStoreValue::operator level_id&() { return get_level_id(); }
CrawlStoreValue::operator level_pos&() { return get_level_pos(); }
-CrawlStoreValue::operator monster&() { return get_monster(); }
-CrawlStoreValue::operator dlua_chunk&() { return get_dlua_chunk(); }
-#else
-&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();
-}
-
-&CrawlStoreValue::operator level_id()
-{
- return get_level_id();
-}
-
-&CrawlStoreValue::operator level_pos()
-{
- return get_level_pos();
-}
-
-&CrawlStoreValue::operator monsters()
-{
- return get_monster();
-}
-
-&CrawlStoreValue::operator dlua_chunk()
-{
- return get_lua();
-}
-#endif
+CrawlStoreValue::operator monsters&() { return get_monster(); }
+CrawlStoreValue::operator dlua_chunk&() { return get_lua(); }
///////////////////////////
// Const typecast operators