diff options
| author | skidau <skidau@gmail.com> | 2015-01-25 15:44:30 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-01-25 15:44:30 +1100 |
| commit | 0aef1d27aa03e79e2cecb96a3bbf540f3ddb4aa0 (patch) | |
| tree | 17172047a8817f13266a1044d753d107509a601e /Source | |
| parent | d7a875222804cb9ab6fda6041d12190ec7d8aab2 (diff) | |
| parent | 3aa3002010bf407e3f23f8338cf1869dd3bd43f0 (diff) | |
Merge pull request #1933 from magumagu/intellisense-error-fix
Fix Intellisense error spam on Visual Studio.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/BitField.h | 4 | ||||
| -rw-r--r-- | Source/PCH/pch.h | 13 | ||||
| -rw-r--r-- | Source/VSProps/Base.props | 14 |
3 files changed, 18 insertions, 13 deletions
diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 9e1f094db4..c6044be558 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -115,10 +115,14 @@ template<std::size_t position, std::size_t bits, typename T> struct BitField { private: +#ifndef _WIN32 // This constructor might be considered ambiguous: // Would it initialize the storage or just the bitfield? // Hence, delete it. Use the assignment operator to set bitfield values! + // MSVC 2013 Intellisense complains that this declaration isn't allowed + // in a union member, so disable it on Windows. BitField(T val) = delete; +#endif public: // Force default constructor to be created diff --git a/Source/PCH/pch.h b/Source/PCH/pch.h index bddae06dee..5402a27a44 100644 --- a/Source/PCH/pch.h +++ b/Source/PCH/pch.h @@ -67,19 +67,6 @@ #error Please update your build environment to VS2013 with Update 3 or later! #endif -// This numeral indicates the "minimum system required" to run the resulting -// program. Dolphin targets Vista+, so it should be 0x0600. However in practice, -// _WIN32_WINNT just removes up-level API declarations from headers. This is a -// problem for XAudio2 and XInput, where Dolphin expects to compile against the -// Win8+ versions of their headers. So while we really need Vista+ level of -// support, we declare Win8+ here globally. If this becomes a problem, the -// higher declaration can be contained to just the XAudio2/XInput related code. -#define _WIN32_WINNT 0x0602 - -// Exclude rarely-used stuff from Windows headers -#define WIN32_LEAN_AND_MEAN -// Don't include Windows min/max definitions. They would conflict with the STL. -#define NOMINMAX #include <Windows.h> #endif diff --git a/Source/VSProps/Base.props b/Source/VSProps/Base.props index 3e447b5420..a1abd19963 100644 --- a/Source/VSProps/Base.props +++ b/Source/VSProps/Base.props @@ -53,6 +53,20 @@ <PreprocessorDefinitions>PSAPI_VERSION=1;_M_X86=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>SFML_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Platform)'=='x64'">_ARCH_64=1;_M_X86_64=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <!-- + Make sure we include a clean version of windows.h. + --> + <PreprocessorDefinitions Condition="'$(ProjectName)'!='portaudio' And '$(ProjectName)'!='wxWidgets'">WIN32_LEAN_AND_MEAN;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <!-- + This numeral indicates the "minimum system required" to run the resulting + program. Dolphin targets Vista+, so it should be 0x0600. However in practice, + _WIN32_WINNT just removes up-level API declarations from headers. This is a + problem for XAudio2 and XInput, where Dolphin expects to compile against the + Win8+ versions of their headers. So while we really need Vista+ level of + support, we declare Win8+ here globally. If this becomes a problem, the + higher declaration can be contained to just the XAudio2/XInput related code. + --> + <PreprocessorDefinitions>_WIN32_WINNT=0x0602;%(PreprocessorDefinitions)</PreprocessorDefinitions> <WarningLevel>Level3</WarningLevel> <TreatWarningAsError>true</TreatWarningAsError> <IntrinsicFunctions>true</IntrinsicFunctions> |
