mirror of https://github.com/stella-emu/stella.git
Some cleanups to Visual Studio project for warnings.
Disable all warnings from httplib.h, since we don't control that code. Fix a few warnings recommended by VS, and disable the rest.
This commit is contained in:
parent
88742d93ef
commit
aa74f00b7f
|
@ -135,7 +135,7 @@ namespace BSPF
|
|||
#endif
|
||||
|
||||
// Get next power of two greater than or equal to the given value
|
||||
inline size_t nextPowerOfTwo(size_t size) {
|
||||
inline constexpr size_t nextPowerOfTwo(size_t size) {
|
||||
if(size < 2) return 1;
|
||||
size_t power2 = 1;
|
||||
while(power2 < size)
|
||||
|
@ -145,7 +145,7 @@ namespace BSPF
|
|||
|
||||
// Get next multiple of the given value
|
||||
// Note that this only works when multiple is a power of two
|
||||
inline size_t nextMultipleOf(size_t size, size_t multiple) {
|
||||
inline constexpr size_t nextMultipleOf(size_t size, size_t multiple) {
|
||||
return (size + multiple - 1) & ~(multiple - 1);
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ namespace BSPF
|
|||
{
|
||||
auto pos = std::search(s1.cbegin()+startpos, s1.cend(),
|
||||
s2.cbegin(), s2.cend(), [](char ch1, char ch2) {
|
||||
return toupper(uInt8(ch1)) == toupper(uInt8(ch2));
|
||||
return toupper(static_cast<uInt8>(ch1)) == toupper(static_cast<uInt8>(ch2));
|
||||
});
|
||||
return pos == s1.cend() ? string::npos : pos - (s1.cbegin()+startpos);
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ namespace BSPF
|
|||
size_t pos = 1;
|
||||
for(uInt32 j = 1; j < s2.size(); ++j)
|
||||
{
|
||||
size_t found = findIgnoreCase(s1, s2.substr(j, 1), pos);
|
||||
const size_t found = findIgnoreCase(s1, s2.substr(j, 1), pos);
|
||||
if(found == string::npos)
|
||||
return false;
|
||||
pos += found + 1;
|
||||
|
@ -282,7 +282,7 @@ namespace BSPF
|
|||
inline bool matchesCamelCase(const string_view s1, const string_view s2)
|
||||
{
|
||||
// skip leading '_' for matching
|
||||
uInt32 ofs = (s1[0] == '_' && s2[0] == '_') ? 1 : 0;
|
||||
const uInt32 ofs = (s1[0] == '_' && s2[0] == '_') ? 1 : 0;
|
||||
|
||||
if(startsWithIgnoreCase(s1.substr(ofs), s2.substr(ofs, 1)))
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ namespace BSPF
|
|||
{
|
||||
if(std::isupper(s2[j]))
|
||||
{
|
||||
size_t found = s1.find_first_of(s2[j], pos + ofs);
|
||||
const size_t found = s1.find_first_of(s2[j], pos + ofs);
|
||||
|
||||
if(found == string::npos)
|
||||
return false;
|
||||
|
@ -306,7 +306,7 @@ namespace BSPF
|
|||
}
|
||||
else
|
||||
{
|
||||
size_t found = findIgnoreCase(s1, s2.substr(j, 1), pos + ofs);
|
||||
const size_t found = findIgnoreCase(s1, s2.substr(j, 1), pos + ofs);
|
||||
|
||||
if(found == string::npos)
|
||||
return false;
|
||||
|
@ -335,7 +335,7 @@ namespace BSPF
|
|||
// Trim leading and trailing whitespace from a string
|
||||
inline string trim(const string& str)
|
||||
{
|
||||
string::size_type first = str.find_first_not_of(' ');
|
||||
const string::size_type first = str.find_first_not_of(' ');
|
||||
return (first == string::npos) ? EmptyString :
|
||||
str.substr(first, str.find_last_not_of(' ')-first+1);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ class PlusROM : public Serializable
|
|||
string myPath;
|
||||
|
||||
std::array<uInt8, 256> myRxBuffer, myTxBuffer;
|
||||
uInt8 myRxReadPos, myRxWritePos, myTxPos;
|
||||
uInt8 myRxReadPos{0}, myRxWritePos{0}, myTxPos{0};
|
||||
|
||||
std::deque<shared_ptr<PlusROMRequest>> myPendingRequests;
|
||||
|
||||
|
|
|
@ -22,11 +22,15 @@
|
|||
* We can't control the quality of code from outside projects, so for now
|
||||
* just disable warnings for it.
|
||||
*/
|
||||
#ifdef __clang__
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Weverything"
|
||||
#include "httplib.h"
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(BSPF_WINDOWS)
|
||||
#pragma warning(push, 0)
|
||||
#include "httplib.h"
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#include "httplib.h"
|
||||
#endif
|
||||
|
|
|
@ -24,11 +24,15 @@
|
|||
* We can't control the quality of code from outside projects, so for now
|
||||
* just disable warnings for it.
|
||||
*/
|
||||
#ifdef __clang__
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Weverything"
|
||||
#include "source/sqlite3.h"
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(BSPF_WINDOWS)
|
||||
#pragma warning(push, 0)
|
||||
#include "source/sqlite3.h"
|
||||
#pragma warning(pop)
|
||||
#else
|
||||
#include "source/sqlite3.h"
|
||||
#endif
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -296,7 +296,7 @@
|
|||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -332,7 +332,7 @@
|
|||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -368,7 +368,7 @@
|
|||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -402,7 +402,7 @@
|
|||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -437,7 +437,7 @@
|
|||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -472,7 +472,7 @@
|
|||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -510,7 +510,7 @@
|
|||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -549,7 +549,7 @@
|
|||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -588,7 +588,7 @@
|
|||
<ObjectFileName>$(IntDir)obj\\windows\%(RelativeDir)</ObjectFileName>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<DisableSpecificWarnings>4100;4127;4146;4244;26440;26446;26472;26455;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<AssemblerListingLocation>$(IntDir)asm\windows\%(RelativeDir)</AssemblerListingLocation>
|
||||
|
@ -2144,6 +2144,8 @@
|
|||
<ClInclude Include="..\gui\ToolTip.hxx" />
|
||||
<ClInclude Include="..\gui\UndoHandler.hxx" />
|
||||
<ClInclude Include="..\gui\WhatsNewDialog.hxx" />
|
||||
<ClInclude Include="..\httplib\httplib.h" />
|
||||
<ClInclude Include="..\httplib\http_lib.hxx" />
|
||||
<ClInclude Include="..\json\json.hxx" />
|
||||
<ClInclude Include="..\json\json_lib.hxx" />
|
||||
<ClInclude Include="..\libpng\pngdebug.h" />
|
||||
|
|
|
@ -91,6 +91,9 @@
|
|||
<Filter Include="Source Files\sqlite\source">
|
||||
<UniqueIdentifier>{ea737878-f4b5-4334-a356-353c6b68bdcd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\httplib">
|
||||
<UniqueIdentifier>{e216a718-4078-4a08-b134-4987ec071e31}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\common\FBBackendSDL2.cxx">
|
||||
|
@ -2324,6 +2327,12 @@
|
|||
<ClInclude Include="..\gui\NavigationWidget.hxx">
|
||||
<Filter>Header Files\gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\httplib\http_lib.hxx">
|
||||
<Filter>Header Files\httplib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\httplib\httplib.h">
|
||||
<Filter>Header Files\httplib</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="stella.ico">
|
||||
|
|
Loading…
Reference in New Issue