Fix compil warnings: disable #pragma specific to MSVC

This commit is contained in:
jean-pierre charras 2023-09-27 08:22:39 +02:00
parent 4746bde4b3
commit 6f9affe3db
4 changed files with 16 additions and 0 deletions

View File

@ -32,8 +32,10 @@
#include <wx/debug.h>
#include "../../libs/kimath/include/geometry/eda_angle.h"
#if defined( _MSC_VER )
#pragma warning( push )
#pragma warning( disable : 4275 )
#endif
namespace KIFONT
{
@ -117,6 +119,8 @@ typedef std::vector<BOX2D> GLYPH_BOUNDING_BOX_LIST;
} // namespace KIFONT
#if defined( _MSC_VER )
#pragma warning( pop )
#endif
#endif // GLYPH_H

View File

@ -33,8 +33,10 @@ struct WINDOW_SETTINGS;
class wxString;
class wxWindow;
#if defined( _MSC_VER )
#pragma warning( push )
#pragma warning( disable : 4275 )
#endif
namespace KIGFX
{
@ -118,7 +120,9 @@ namespace KIGFX
} // namespace KIGFX
#if defined( _MSC_VER )
#pragma warning( pop )
#endif
#endif

View File

@ -121,8 +121,10 @@ private:
FuncType m_func;
};
#if defined( _MSC_VER )
#pragma warning( push )
#pragma warning( disable : 5266 ) // 'const' qualifier on return type has no effect
#endif
template<typename Owner, typename T, typename Base = Owner>
class METHOD
@ -176,7 +178,9 @@ public:
METHOD() = delete;
};
#if defined( _MSC_VER )
#pragma warning( pop )
#endif
class PROPERTY_BASE
{

View File

@ -33,8 +33,10 @@
#include <math/box2.h>
#include <inspectable.h>
#if defined( _MSC_VER )
#pragma warning( push )
#pragma warning( disable : 4275 )
#endif
namespace KIGFX
{
@ -164,6 +166,8 @@ private:
} // namespace KIGFX
#if defined( _MSC_VER )
#pragma warning( pop )
#endif
#endif