Make -Woverloaded-virtual an error

Had to devirtualize some functions.
This commit is contained in:
Nekotekina 2021-02-15 15:34:10 +03:00
parent 035ab590ec
commit 0bcece4585
4 changed files with 5 additions and 4 deletions

View file

@ -23,7 +23,7 @@ protected:
const std::add_pointer_t<const cpu_thread> m_cpu; const std::add_pointer_t<const cpu_thread> m_cpu;
u32 m_op = 0; u32 m_op = 0;
virtual void Write(const std::string& value) void Write(const std::string& value)
{ {
switch (m_mode) switch (m_mode)
{ {

View file

@ -440,13 +440,13 @@ namespace rsx
is_compiled = false; is_compiled = false;
} }
virtual void set_text(const std::u32string& text) void set_text(const std::u32string& text)
{ {
this->text = text; this->text = text;
is_compiled = false; is_compiled = false;
} }
virtual void set_text(localized_string_id id) void set_text(localized_string_id id)
{ {
set_text(get_localized_u32string(id)); set_text(get_localized_u32string(id));
} }

View file

@ -116,7 +116,7 @@ namespace vk
return false; return false;
} }
virtual bool init(u32 w, u32 h) bool init(u32 w, u32 h)
{ {
m_width = w; m_width = w;
m_height = h; m_height = h;

View file

@ -31,6 +31,7 @@ else()
add_compile_options(-Werror=sign-compare) add_compile_options(-Werror=sign-compare)
add_compile_options(-Werror=reorder) add_compile_options(-Werror=reorder)
add_compile_options(-Werror=return-type) add_compile_options(-Werror=return-type)
add_compile_options(-Werror=overloaded-virtual)
#TODO Clean the code so these are removed #TODO Clean the code so these are removed
add_compile_options(-Wno-attributes) add_compile_options(-Wno-attributes)