File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919#include < cocos2d.h>
2020
21+ #include < Geode/Result.hpp>
22+
2123#include < Geode/utils/function.hpp>
2224#include < Geode/utils/StringMap.hpp>
2325#include < Geode/utils/ZStringView.hpp>
@@ -70,7 +72,7 @@ namespace horrible {
7072 * @param id The ID of the option to set the delegate for
7173 * @param callback The hook callback to register for this option's delegate
7274 */
73- void addDelegate (std::string id, geode::Function<void (bool )>&& callback);
75+ void addDelegate (std::string&& id, geode::Function<void (bool )>&& callback);
7476
7577 /* *
7678 * Returns a reference to the array of all registered options
Original file line number Diff line number Diff line change 22
33#include " Horrible.hpp"
44
5+ #include < Geode/Result.hpp>
6+
57#include < Geode/loader/Event.hpp>
68#include < Geode/loader/Dispatch.hpp>
79
Original file line number Diff line number Diff line change @@ -30,11 +30,9 @@ void OptionManager::registerOption(Option option) {
3030 };
3131};
3232
33- void OptionManager::addDelegate (std::string id, Function<void (bool )>&& callback) {
33+ void OptionManager::addDelegate (std::string&& id, Function<void (bool )>&& callback) {
3434 auto & thisDelegate = m_delegates[std::move (id)];
3535 thisDelegate.push_back (std::move (callback));
36-
37- log::debug (" Added delegate for option {} ({} total)" , id, thisDelegate.size ());
3836};
3937
4038std::span<const Option> OptionManager::getOptions () const noexcept {
Original file line number Diff line number Diff line change @@ -315,7 +315,8 @@ void OptionMenu::resetFilters(CCObject*) {
315315 m_impl->selectedTier = SillyTier::None;
316316 CategoryEvent ().send (" " , false );
317317 };
318- });
318+ }
319+ );
319320};
320321
321322void OptionMenu::openModSettings (CCObject*) {
You can’t perform that action at this time.
0 commit comments