Skip to content

Commit

Permalink
make load_proc member function const
Browse files Browse the repository at this point in the history
  • Loading branch information
Berthalamew committed Dec 5, 2024
1 parent 45df2aa commit 6cba9d1
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/interface/screens/screen_4way_signin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void c_screen_4way_signin::initialize(s_screen_parameters* parameters)
user_interface_squad_clear_match_playlist();
}

void* c_screen_4way_signin::load_proc()
const void* c_screen_4way_signin::load_proc(void) const
{
switch (this->m_call_context)
{
Expand All @@ -403,7 +403,7 @@ void* c_screen_4way_signin::load_proc()
default:
DISPLAY_ASSERT("unreachable");
}
return nullptr;
return NULL;
}

bool __cdecl user_interface_mainmenu_sign_out_controller_callback(e_controller_index controller_index)
Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/interface/screens/screen_4way_signin.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class c_screen_4way_signin : protected c_screen_widget
virtual void update() override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_4way_signin, 0xA60);
8 changes: 4 additions & 4 deletions xlive/Blam/Engine/interface/screens/screen_brightness_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ class c_brightness_menu : protected c_screen_with_menu
INVOKE_VFPTR_FN(_get_vfptr_table, 37, void(class_type::**)(s_screen_state*), state);
}

virtual void* load_proc() override
virtual const void* load_proc(void) const override
{
return INVOKE_VFPTR_FN(_get_vfptr_table, 38, void*(class_type::**)());
return INVOKE_VFPTR_FN(_get_vfptr_table, 38, const void*(class_type::**)() const);
}

virtual bool overlay_effect_is_disabled() override
Expand All @@ -282,9 +282,9 @@ class c_brightness_menu : protected c_screen_with_menu
private:
// reserved name
template<typename T>
static T _get_vfptr_table(DWORD idx)
static const T _get_vfptr_table(DWORD idx)
{
return reinterpret_cast<T>(&Memory::GetAddress<void**>(0x4D7ABC)[idx]);
return reinterpret_cast<const T>(&Memory::GetAddress<const void**>(0x4D7ABC)[idx]);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void c_cartographer_account_manager_menu::post_initialize(void)
return c_screen_with_menu::post_initialize();
}

void* c_cartographer_account_manager_menu::load_proc(void)
const void* c_cartographer_account_manager_menu::load_proc(void) const
{
return c_cartographer_account_manager_menu::load_default_context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class c_cartographer_account_manager_menu : protected c_screen_with_menu
virtual void pre_destroy(void) override;
virtual void initialize(s_screen_parameters* screen_parameters) override;
virtual void post_initialize(void) override;
virtual void* load_proc(void) override;
const virtual const void* load_proc(void) const override;
};
// ASSERT_STRUCT_SIZE(c_cartographer_account_manager_menu, 3396);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void c_cartographer_error_menu::initialize(s_screen_parameters* screen_parameter
}
}

void* c_cartographer_error_menu::load_proc()
const void* c_cartographer_error_menu::load_proc(void) const
{
return c_cartographer_error_menu::load;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class c_cartographer_error_menu : protected c_screen_widget
virtual void pre_destroy() override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* screen_parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;

private:
};
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void c_cartographer_guide_menu::initialize(s_screen_parameters* screen_parameter
}
}

void* c_cartographer_guide_menu::load_proc()
const void* c_cartographer_guide_menu::load_proc(void) const
{
return c_cartographer_guide_menu::load;
}
Expand Down Expand Up @@ -383,7 +383,7 @@ void* c_cartographer_credits_menu::load(s_screen_parameters* parameters)
return credits_menu;
}

void* c_cartographer_credits_menu::load_proc()
const void* c_cartographer_credits_menu::load_proc(void) const
{
return c_cartographer_credits_menu::load;
}
Expand Down Expand Up @@ -564,7 +564,7 @@ void c_cartographer_update_menu::update()
c_screen_with_menu::update();
}

void* c_cartographer_update_menu::load_proc()
const void* c_cartographer_update_menu::load_proc(void) const
{
return c_cartographer_update_menu::load;
}
Expand Down Expand Up @@ -679,7 +679,7 @@ c_cartographer_update_notice_menu::c_cartographer_update_notice_menu(e_user_inte
{
}

void* c_cartographer_update_notice_menu::load_proc()
const void* c_cartographer_update_notice_menu::load_proc(void) const
{
return c_cartographer_update_notice_menu::load;
}
Expand Down
10 changes: 5 additions & 5 deletions xlive/Blam/Engine/interface/screens/screen_cartographer_menus.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// miscellaneous cartographer menus

#include "interface/user_interface_widget.h"
#include "interface/user_interface.h"
#include "interface/user_interface_widget_list.h"
#include "interface/user_interface_widget_list_item.h"
#include "interface/user_interface_widget_window.h"
Expand Down Expand Up @@ -61,7 +61,7 @@ class c_cartographer_guide_menu : public c_screen_with_menu

virtual ~c_cartographer_guide_menu() = default;
virtual void initialize(s_screen_parameters* screen_parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};


Expand Down Expand Up @@ -96,7 +96,7 @@ class c_cartographer_credits_menu : public c_screen_with_menu
// c_cartographer_credits_menu virtual functions

virtual ~c_cartographer_credits_menu() = default;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
virtual void initialize(s_screen_parameters* screen_parameters) override;
};

Expand Down Expand Up @@ -141,7 +141,7 @@ class c_cartographer_update_menu : public c_screen_with_menu

virtual ~c_cartographer_update_menu() = default;
virtual void update() override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
virtual void initialize(s_screen_parameters* screen_parameters) override;
};

Expand Down Expand Up @@ -178,7 +178,7 @@ class c_cartographer_update_notice_menu : public c_screen_with_menu
// c_cartographer_update_notice_menu virtual functions.

virtual ~c_cartographer_update_notice_menu() = default;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
virtual void initialize(s_screen_parameters* screen_parameters) override;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void c_screen_press_start_introduction::sub_60EBC2(int32 a1)
INVOKE_TYPE(0x23F011, 0x0, void(__thiscall*)(c_screen_press_start_introduction*, int32), this, a1);
}

void* c_screen_press_start_introduction::load_proc()
const void* c_screen_press_start_introduction::load_proc(void) const
{
return &c_screen_press_start_introduction::load;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ class c_screen_press_start_introduction : protected c_screen_widget
bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void sub_60EBC2(int32 a1) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_press_start_introduction, 0xB8C);
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/interface/screens/screen_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void c_screen_settings::post_initialize_button_keys()
}


void* c_screen_settings::load_proc()
const void* c_screen_settings::load_proc(void) const
{
return &c_screen_settings::load;
}
Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/interface/screens/screen_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ class c_screen_settings : protected c_screen_with_menu

virtual ~c_screen_settings() = default;
virtual void post_initialize_button_keys() override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_settings, 0xEC8);
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ void* c_screen_squad_settings::load(s_screen_parameters* parameters)
}


void* c_screen_squad_settings::load_proc()
const void* c_screen_squad_settings::load_proc(void) const
{
return &c_screen_squad_settings::load;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ class c_screen_squad_settings : protected c_screen_widget
virtual void update() override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_squad_settings, 0xEC4);
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void c_screen_virtual_keyboard::initialize(s_screen_parameters* parameters)
update_custom_labels(old_context);
}

void* c_screen_virtual_keyboard::load_proc()
const void* c_screen_virtual_keyboard::load_proc(void) const
{
return &c_screen_virtual_keyboard::load;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class c_screen_virtual_keyboard : protected c_screen_widget
virtual void render_widget(rectangle2d* viewport_bounds) override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_virtual_keyboard, 0x3B80);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void c_screen_xbox_live_task_progress_dialog::initialize(s_screen_parameters* pa
this->setup_children();
}

void* c_screen_xbox_live_task_progress_dialog::load_proc()
const void* c_screen_xbox_live_task_progress_dialog::load_proc(void) const
{
return &c_screen_xbox_live_task_progress_dialog::load;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ class c_screen_xbox_live_task_progress_dialog : c_screen_widget
virtual void update() override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_xbox_live_task_progress_dialog, 0xA70);

0 comments on commit 6cba9d1

Please sign in to comment.