Skip to content

Commit b71b08d

Browse files
committed
omg a
1 parent d51c3f5 commit b71b08d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/Horrible.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace horrible {
132132
* @param id The ID of the option to delegate for
133133
* @param hooks The map of hooks to delegate
134134
*/
135-
AWCW_HORRIBLE_API_DLL void delegateHooks(std::string_view id, geode::utils::StringMap<std::shared_ptr<geode::Hook>>& hooks);
135+
AWCW_HORRIBLE_API_DLL void delegateHooks(std::string id, geode::utils::StringMap<std::shared_ptr<geode::Hook>>& hooks);
136136
};
137137

138138
// Statically register an option
@@ -143,5 +143,5 @@ namespace horrible {
143143
// Delegate registered hooks to OptionManager for dynamic toggling
144144
#define HORRIBLE_DELEGATE_HOOKS(id) \
145145
static void onModify(auto& self) { \
146-
horrible::delegateHooks(std::string_view(id), self.m_hooks); \
146+
horrible::delegateHooks(id, self.m_hooks); \
147147
}

src/include/Horrible.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ OptionManager* OptionManager::get() noexcept {
8181
return inst;
8282
};
8383

84-
void horrible::delegateHooks(std::string_view id, geode::utils::StringMap<std::shared_ptr<geode::Hook>>& hooks) {
84+
void horrible::delegateHooks(std::string id, geode::utils::StringMap<std::shared_ptr<geode::Hook>>& hooks) {
8585
if (auto om = OptionManager::get()) {
8686
auto value = om->getOption(id);
8787

@@ -95,7 +95,7 @@ void horrible::delegateHooks(std::string_view id, geode::utils::StringMap<std::s
9595
geode::log::debug("Delegating {} hooks for {}", allHooks.size(), id);
9696

9797
om->addDelegate(
98-
std::string(id), // string buffers die on other platforms ???
98+
std::move(id), // string buffers die here on other platforms ???
9999
[allHooks = std::move(allHooks)](bool value) {
100100
for (auto hook : allHooks) (void)hook->toggle(value);
101101
}

0 commit comments

Comments
 (0)