mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Warning fixes
This commit is contained in:
parent
447a78e453
commit
55aa1ff66e
@ -383,8 +383,12 @@ if(NOT MSVC)
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type -Wno-unused-function -Wno-sign-compare -Wno-unused-but-set-variable -Wno-reorder -Wno-unknown-pragmas -Wno-unused-value -Wno-unused-variable")
|
||||
if(NOT CLANG)
|
||||
# This one is very useful but has many false positives.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
||||
|
@ -178,6 +178,7 @@ bool TextDrawerWin32::DrawStringBitmap(std::vector<uint8_t> &bitmapData, TextStr
|
||||
|
||||
if (size.cx == 0 || size.cy == 0) {
|
||||
// Don't draw zero-sized textures.
|
||||
WARN_LOG(Log::G3D, "Text '%.*s' caused a zero size image", (int)str.length(), str.data());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ void WebSocketBroadcastConfigGet(DebuggerRequest & req) {
|
||||
|
||||
json.pushDict("disallowed");
|
||||
|
||||
for (const auto[name, status] : disallowed_config) {
|
||||
for (const auto &[name, status] : disallowed_config) {
|
||||
if (status)
|
||||
json.writeBool(name, true);
|
||||
}
|
||||
@ -97,7 +97,7 @@ void WebSocketBroadcastConfigSet(DebuggerRequest & req) {
|
||||
|
||||
json.pushDict("disallowed");
|
||||
|
||||
for (const auto[name, status] : disallowed_config) {
|
||||
for (const auto &[name, status] : disallowed_config) {
|
||||
if (status)
|
||||
json.writeBool(name, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user