From d1d72e54b99c18b36d72cee1cc1623f0f40c3cb1 Mon Sep 17 00:00:00 2001 From: gir489 <100792176+gir489returns@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:17:59 -0400 Subject: [PATCH] Add motorcycle club, too. (#3013) * Refactor add_callback_for_labels to take an initializer_list. --- src/services/custom_text/custom_text_service.cpp | 4 ++-- src/services/custom_text/custom_text_service.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/custom_text/custom_text_service.cpp b/src/services/custom_text/custom_text_service.cpp index 7bf7b05a..7dd8c6df 100644 --- a/src/services/custom_text/custom_text_service.cpp +++ b/src/services/custom_text/custom_text_service.cpp @@ -7,7 +7,7 @@ namespace big custom_text_service::custom_text_service() { add_callback_for_labels({"RESPAWN_W"_J, "RESPAWN_W_MP"_J}, respawn_label_callback); - add_callback_for_labels({"FMMC_KEY_TIP15"_J}, do_ceo_name_resize); + add_callback_for_labels({"FMMC_KEY_TIP15"_J, "FMMC_MCK_TIP15"_J}, do_ceo_name_resize); add_label_overwrite("GC_OTR_TMR"_J, "HIDING FROM CLOWNS"); // add_label_overwrite("TICK_LEFTCHEAT"_J, "~a~~HUD_COLOUR_WHITE~ has been swatted by Rockstar."); @@ -24,7 +24,7 @@ namespace big return m_callbacks.insert({hash, cb}).second; } - bool custom_text_service::add_callback_for_labels(std::list hashes, custom_label_callback&& cb) + bool custom_text_service::add_callback_for_labels(std::initializer_list hashes, custom_label_callback&& cb) { bool result = true; for (const auto& hash : hashes) diff --git a/src/services/custom_text/custom_text_service.hpp b/src/services/custom_text/custom_text_service.hpp index d2f4d489..0dbdd21b 100644 --- a/src/services/custom_text/custom_text_service.hpp +++ b/src/services/custom_text/custom_text_service.hpp @@ -19,7 +19,7 @@ namespace big custom_text_service& operator=(custom_text_service&&) noexcept = delete; bool add_callback_for_label(rage::joaat_t hash, custom_label_callback&& cb); - bool add_callback_for_labels(std::list hashes, custom_label_callback&& cb); + bool add_callback_for_labels(std::initializer_list hashes, custom_label_callback&& cb); bool add_label_overwrite(rage::joaat_t hash, std::string_view overwrite); /**