From 5a713448da5f2f9115d8e1ab531f03601902747b Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 4 Nov 2024 17:38:21 -0300 Subject: [PATCH] Noisy MSVC warnings are disabled with laf-base flags now --- laf | 2 +- src/CMakeLists.txt | 7 ++----- src/app/commands/cmd_canvas_size.cpp | 5 ----- src/app/ui/editor/standby_state.cpp | 4 ---- src/config.h | 15 --------------- 5 files changed, 3 insertions(+), 30 deletions(-) diff --git a/laf b/laf index 4618e1d25..5ec00f537 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit 4618e1d256394f39e67fc0fe898dc77e8a1584fc +Subproject commit 5ec00f5373be19ecf77f9376584cdda5141f9890 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58e68673f..27e00ae4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,12 +19,9 @@ if(MSVC) if(LAF_BACKEND STREQUAL "skia") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG") endif() - - add_definitions(-D_SCL_SECURE_NO_WARNINGS) - add_definitions(-wd4267) # disable warnings about signed/unsigned comparison - add_definitions(-wd4244) # disable warnings about possible loss of data else() - # disable warnings about signed/unsigned comparison + # Disable warnings about signed/unsigned comparison. + # TODO we should remove this (or move it to laf-base) add_definitions(-Wno-sign-compare) endif() diff --git a/src/app/commands/cmd_canvas_size.cpp b/src/app/commands/cmd_canvas_size.cpp index 7de65ea2c..234140a2b 100644 --- a/src/app/commands/cmd_canvas_size.cpp +++ b/src/app/commands/cmd_canvas_size.cpp @@ -33,11 +33,6 @@ namespace app { using namespace ui; using namespace app::skin; -// Disable warning about usage of "this" in initializer list. -#ifdef _MSC_VER -#pragma warning(disable:4355) -#endif - struct CanvasSizeParams : public NewParams { Param ui { this, true, "ui" }; Param left { this, 0, "left" }; diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp index 9dc69064f..be43ca277 100644 --- a/src/app/ui/editor/standby_state.cpp +++ b/src/app/ui/editor/standby_state.cpp @@ -78,10 +78,6 @@ namespace app { using namespace ui; -#ifdef _MSC_VER -#pragma warning(disable:4355) // warning C4355: 'this' : used in base member initializer list -#endif - StandbyState::StandbyState() : m_decorator(new Decorator(this)) , m_transformSelectionHandlesAreVisible(false) diff --git a/src/config.h b/src/config.h index e2e873786..941c19981 100644 --- a/src/config.h +++ b/src/config.h @@ -11,21 +11,6 @@ #define ASEPRITE_CONFIG_H_INCLUDED -// In MSVC -#ifdef _MSC_VER - // Avoid warnings about insecure standard C++ functions - #ifndef _CRT_SECURE_NO_WARNINGS - #define _CRT_SECURE_NO_WARNINGS - #endif - - // Disable warning C4355 in MSVC: 'this' used in base member initializer list - #pragma warning(disable:4355) - - // Disable warning C4710 in MSVC: function not inlined (generated by MSVC header files) - // https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4710 - #pragma warning(disable:4710) -#endif - #include "base/base.h" #include "base/debug.h" #include "base/log.h"