mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-22 22:47:27 +00:00
We (the Microsoft C++ team) use the dolphin project as part of our "Real world code" tests. I noticed a few issues in windows specific code when building dolphin with the MSVC compiler in its conformance mode (/permissive-). For more information on /permissive- see our blog https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/. These changes are to address 3 different types of issues: 1) Use of qualified names in member declarations struct A { void A::f() { } // error C4596: illegal qualified name in member declaration // remove redundant 'A::' to fix }; 2) Binding a non-const reference to a temporary struct S{}; // If arg is in 'in' parameter, then it should be made const. void func(S& arg){} int main() { //error C2664: 'void func(S &)': cannot convert argument 1 from 'S' to 'S &' //note: A non-const reference may only be bound to an lvalue func( S() ); //Work around this by creating a local, and using it to call the function S s; func( s ); } 3) Add missing #include <intrin.h> Because of the workaround you are using in the code you will need to include this. This is because of changes in the libraries and not /permissive- |
||
|---|---|---|
| .. | ||
| Crypto | ||
| GL | ||
| Logging | ||
| Align.h | ||
| Analytics.cpp | ||
| Analytics.h | ||
| Arm64Emitter.cpp | ||
| Arm64Emitter.h | ||
| ArmCommon.h | ||
| ArmCPUDetect.cpp | ||
| Assert.h | ||
| Atomic_GCC.h | ||
| Atomic_Win32.h | ||
| Atomic.h | ||
| BitField.h | ||
| BitField.natvis | ||
| BitSet.h | ||
| BitUtils.h | ||
| BlockingLoop.h | ||
| CDUtils.cpp | ||
| CDUtils.h | ||
| ChunkFile.h | ||
| CMakeLists.txt | ||
| CodeBlock.h | ||
| ColorUtil.cpp | ||
| ColorUtil.h | ||
| Common.h | ||
| Common.vcxproj | ||
| Common.vcxproj.filters | ||
| CommonFuncs.h | ||
| CommonPaths.h | ||
| CommonTypes.h | ||
| CPUDetect.h | ||
| DebugInterface.h | ||
| ENetUtil.cpp | ||
| ENetUtil.h | ||
| Event.h | ||
| FifoQueue.h | ||
| FileSearch.cpp | ||
| FileSearch.h | ||
| FileUtil.cpp | ||
| FileUtil.h | ||
| FixedSizeQueue.h | ||
| Flag.h | ||
| FPURoundMode.h | ||
| GekkoDisassembler.cpp | ||
| GekkoDisassembler.h | ||
| GenericCPUDetect.cpp | ||
| GenericFPURoundMode.cpp | ||
| Hash.cpp | ||
| Hash.h | ||
| IniFile.cpp | ||
| IniFile.h | ||
| Intrinsics.h | ||
| JitRegister.cpp | ||
| JitRegister.h | ||
| LibusbContext.cpp | ||
| LibusbContext.h | ||
| LinearDiskCache.h | ||
| make_scmrev.h.js | ||
| MathUtil.cpp | ||
| MathUtil.h | ||
| MD5.cpp | ||
| MD5.h | ||
| MemArena.cpp | ||
| MemArena.h | ||
| MemoryUtil.cpp | ||
| MemoryUtil.h | ||
| Misc.cpp | ||
| MsgHandler.cpp | ||
| MsgHandler.h | ||
| NandPaths.cpp | ||
| NandPaths.h | ||
| Network.cpp | ||
| Network.h | ||
| NonCopyable.h | ||
| PcapFile.cpp | ||
| PcapFile.h | ||
| PerformanceCounter.cpp | ||
| PerformanceCounter.h | ||
| Profiler.cpp | ||
| Profiler.h | ||
| scmrev.h.in | ||
| SCMRevGen.vcxproj | ||
| ScopeGuard.h | ||
| SDCardUtil.cpp | ||
| SDCardUtil.h | ||
| Semaphore.h | ||
| SettingsHandler.cpp | ||
| SettingsHandler.h | ||
| StringUtil.cpp | ||
| StringUtil.h | ||
| SymbolDB.cpp | ||
| SymbolDB.h | ||
| SysConf.cpp | ||
| SysConf.h | ||
| Thread.cpp | ||
| Thread.h | ||
| Timer.cpp | ||
| Timer.h | ||
| TraversalClient.cpp | ||
| TraversalClient.h | ||
| TraversalProto.h | ||
| TraversalServer.cpp | ||
| ucrtFreadWorkaround.cpp | ||
| Version.cpp | ||
| x64ABI.cpp | ||
| x64ABI.h | ||
| x64CPUDetect.cpp | ||
| x64Emitter.cpp | ||
| x64Emitter.h | ||
| x64FPURoundMode.cpp | ||
| x64Reg.h | ||