mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
X8DrawingEngine: Only disable warnings which the compiler supports.
This fixes compilation with gcc 4.9.4.
This commit is contained in:
committed by
Michał Janiszewski
parent
0ec78052d6
commit
d42b9fc6df
@@ -265,3 +265,13 @@ if (NOT DISABLE_RCT2)
|
||||
# builds without need for -fno-omit-frame-pointer
|
||||
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/rct2/addresses.c PROPERTIES COMPILE_FLAGS -O0)
|
||||
endif ()
|
||||
|
||||
if (CXX_WARN_SUGGEST_FINAL_TYPES)
|
||||
# Disable -Wsuggest-final-types via pragmas where due.
|
||||
add_definitions(-D__WARN_SUGGEST_FINAL_TYPES__)
|
||||
endif ()
|
||||
|
||||
if (CXX_WARN_SUGGEST_FINAL_METHODS)
|
||||
# Disable -Wsuggest-final-methods via pragmas where due.
|
||||
add_definitions(-D__WARN_SUGGEST_FINAL_METHODS__)
|
||||
endif ()
|
||||
|
||||
@@ -133,8 +133,10 @@ void X8RainDrawer::Restore()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WARN_SUGGEST_FINAL_METHODS__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
|
||||
#endif
|
||||
|
||||
X8DrawingEngine::X8DrawingEngine(Ui::IUiContext * uiContext)
|
||||
{
|
||||
@@ -468,7 +470,9 @@ void X8DrawingEngine::DrawDirtyBlocks(uint32 x, uint32 y, uint32 columns, uint32
|
||||
window_draw_all(&_bitsDPI, left, top, right, bottom);
|
||||
}
|
||||
|
||||
#ifdef __WARN_SUGGEST_FINAL_METHODS__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
X8DrawingContext::X8DrawingContext(X8DrawingEngine * engine)
|
||||
{
|
||||
|
||||
@@ -66,8 +66,10 @@ namespace OpenRCT2
|
||||
void Restore();
|
||||
};
|
||||
|
||||
#ifdef __WARN_SUGGEST_FINAL_TYPES__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wsuggest-final-types"
|
||||
#endif
|
||||
class X8DrawingEngine : public IDrawingEngine
|
||||
{
|
||||
protected:
|
||||
@@ -119,7 +121,9 @@ namespace OpenRCT2
|
||||
void DrawAllDirtyBlocks();
|
||||
void DrawDirtyBlocks(uint32 x, uint32 y, uint32 columns, uint32 rows);
|
||||
};
|
||||
#ifdef __WARN_SUGGEST_FINAL_TYPES__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
class X8DrawingContext final : public IDrawingContext
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user