Skip to content

Commit

Permalink
Add motorcycle club, too. (#3013)
Browse files Browse the repository at this point in the history
* Refactor add_callback_for_labels to take an initializer_list.
  • Loading branch information
gir489returns committed Apr 30, 2024
1 parent 17a7ad6 commit d1d72e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/services/custom_text/custom_text_service.cpp
Expand Up @@ -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.");

Expand All @@ -24,7 +24,7 @@ namespace big
return m_callbacks.insert({hash, cb}).second;
}

bool custom_text_service::add_callback_for_labels(std::list<rage::joaat_t> hashes, custom_label_callback&& cb)
bool custom_text_service::add_callback_for_labels(std::initializer_list<rage::joaat_t> hashes, custom_label_callback&& cb)
{
bool result = true;
for (const auto& hash : hashes)
Expand Down
2 changes: 1 addition & 1 deletion src/services/custom_text/custom_text_service.hpp
Expand Up @@ -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<rage::joaat_t> hashes, custom_label_callback&& cb);
bool add_callback_for_labels(std::initializer_list<rage::joaat_t> hashes, custom_label_callback&& cb);
bool add_label_overwrite(rage::joaat_t hash, std::string_view overwrite);

/**
Expand Down

0 comments on commit d1d72e5

Please sign in to comment.