mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
fix create overloads not recognising
This commit is contained in:
parent
4aa09c085b
commit
63e9b4c5f7
2 changed files with 4 additions and 6 deletions
|
@ -137,8 +137,7 @@ namespace geode {
|
|||
|
||||
namespace addresser {
|
||||
template <class Class>
|
||||
Class* friendCreate(typename std::enable_if_t<
|
||||
std::is_same_v<decltype(&Class::create), Class* (*)()>>*);
|
||||
Class* friendCreate(typename std::void_t<decltype(static_cast<Class* (*)()>(&Class::create))>*);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,9 +150,8 @@ namespace geode {
|
|||
friend geode::Result<tulip::hook::HandlerMetadata, std::string> \
|
||||
geode::modifier::handlerMetadataForAddress(uintptr_t address); \
|
||||
template <class Class> \
|
||||
friend Class* \
|
||||
geode::addresser::friendCreate(typename std::enable_if_t< \
|
||||
std::is_same_v<decltype(&Class::create), Class* (*)()>>*);
|
||||
friend Class* geode::addresser:: \
|
||||
friendCreate(typename std::void_t<decltype(static_cast<Class* (*)()>(&Class::create))>*);
|
||||
|
||||
#define GEODE_ADD(...) __VA_ARGS__
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace geode::addresser {
|
|||
inline F rthunkAdjust(T func, F self);
|
||||
|
||||
template <class Class>
|
||||
Class* friendCreate(typename std::enable_if_t<std::is_same_v<decltype(&Class::create), Class* (*)()>>*) {
|
||||
Class* friendCreate(typename std::void_t<decltype(static_cast<Class* (*)()>(&Class::create))>*) {
|
||||
return Class::create();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue