diff options
| author | 2015-09-29 22:13:09 -0400 | |
|---|---|---|
| committer | 2015-10-01 15:43:42 -0400 | |
| commit | 845ac621b3adf0b3f98522a6ecfa7301ad276c9c (patch) | |
| tree | 5aba2d7e78dc44fa1eaa966fa170d1754a186fc1 /src/common/bit_field.h | |
| parent | Merge pull request #1172 from martinlindhe/fix-warnings (diff) | |
| download | yuzu-845ac621b3adf0b3f98522a6ecfa7301ad276c9c.tar.gz yuzu-845ac621b3adf0b3f98522a6ecfa7301ad276c9c.tar.xz yuzu-845ac621b3adf0b3f98522a6ecfa7301ad276c9c.zip | |
bit_field: Re-enable code on MSVC
Diffstat (limited to 'src/common/bit_field.h')
| -rw-r--r-- | src/common/bit_field.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h index d306ce9a9..66689f398 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h | |||
| @@ -125,21 +125,10 @@ public: | |||
| 125 | // so that we can use this within unions | 125 | // so that we can use this within unions |
| 126 | BitField() = default; | 126 | BitField() = default; |
| 127 | 127 | ||
| 128 | #ifndef _WIN32 | ||
| 129 | // We explicitly delete the copy assigment operator here, because the | 128 | // We explicitly delete the copy assigment operator here, because the |
| 130 | // default copy assignment would copy the full storage value, rather than | 129 | // default copy assignment would copy the full storage value, rather than |
| 131 | // just the bits relevant to this particular bit field. | 130 | // just the bits relevant to this particular bit field. |
| 132 | // Ideally, we would just implement the copy assignment to copy only the | ||
| 133 | // relevant bits, but this requires compiler support for unrestricted | ||
| 134 | // unions. | ||
| 135 | // MSVC 2013 has no support for this, hence we disable this code on | ||
| 136 | // Windows (so that the default copy assignment operator will be used). | ||
| 137 | // For any C++11 conformant compiler we delete the operator to make sure | ||
| 138 | // we never use this inappropriate operator to begin with. | ||
| 139 | // TODO: Implement this operator properly once all target compilers | ||
| 140 | // support unrestricted unions. | ||
| 141 | BitField& operator=(const BitField&) = delete; | 131 | BitField& operator=(const BitField&) = delete; |
| 142 | #endif | ||
| 143 | 132 | ||
| 144 | FORCE_INLINE BitField& operator=(T val) | 133 | FORCE_INLINE BitField& operator=(T val) |
| 145 | { | 134 | { |