From bf4053fefa301a307065a07ffc4c3f9f970f2638 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 27 Jan 2025 01:01:05 -0500 Subject: Fix spurious differences when using `ninja diff` (#2294) * Fix spurious differences when using ninja diff * Fix some clangd errors/warnings --- src/d/d_menu_calibration.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/d/d_menu_calibration.cpp') diff --git a/src/d/d_menu_calibration.cpp b/src/d/d_menu_calibration.cpp index e360a661bf..e6d9b2e40c 100644 --- a/src/d/d_menu_calibration.cpp +++ b/src/d/d_menu_calibration.cpp @@ -11,6 +11,21 @@ #include "d/d_msg_string.h" #include "m_Do/m_Do_controller_pad.h" +// Need 0xC bytes of padding with no symbol between dMenu_Calibration_c::__vtable and the end of .data +// This is likely caused by the vtable of an abstract base class getting put there and then stripped out. +// Not sure which abstract base class could go there though, so we simulate it with some dummy classes for now. +class dummy_abstract_class { +public: + virtual void virt_func_0() = 0; +}; +class dummy_child_class : dummy_abstract_class { + virtual void virt_func_0(); +}; +static dummy_child_class dummy() { + dummy_child_class temp; + return temp; +} + /* 803BC238-803BC244 019358 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ static u8 cNullVec__6Z2Calc[12] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -348,4 +363,4 @@ void dMenu_Calibration_c::setHIO(bool i_useHIO) { /* 801AFBF4-801AFC14 1AA534 0020+00 1/0 0/0 0/0 .text draw__19dMenu_Calibration_cFv */ void dMenu_Calibration_c::draw() { _draw(); -} \ No newline at end of file +} -- cgit v1.2.3