mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -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 {
|
namespace addresser {
|
||||||
template <class Class>
|
template <class Class>
|
||||||
Class* friendCreate(typename std::enable_if_t<
|
Class* friendCreate(typename std::void_t<decltype(static_cast<Class* (*)()>(&Class::create))>*);
|
||||||
std::is_same_v<decltype(&Class::create), Class* (*)()>>*);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,9 +150,8 @@ namespace geode {
|
||||||
friend geode::Result<tulip::hook::HandlerMetadata, std::string> \
|
friend geode::Result<tulip::hook::HandlerMetadata, std::string> \
|
||||||
geode::modifier::handlerMetadataForAddress(uintptr_t address); \
|
geode::modifier::handlerMetadataForAddress(uintptr_t address); \
|
||||||
template <class Class> \
|
template <class Class> \
|
||||||
friend Class* \
|
friend Class* geode::addresser:: \
|
||||||
geode::addresser::friendCreate(typename std::enable_if_t< \
|
friendCreate(typename std::void_t<decltype(static_cast<Class* (*)()>(&Class::create))>*);
|
||||||
std::is_same_v<decltype(&Class::create), Class* (*)()>>*);
|
|
||||||
|
|
||||||
#define GEODE_ADD(...) __VA_ARGS__
|
#define GEODE_ADD(...) __VA_ARGS__
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace geode::addresser {
|
||||||
inline F rthunkAdjust(T func, F self);
|
inline F rthunkAdjust(T func, F self);
|
||||||
|
|
||||||
template <class Class>
|
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();
|
return Class::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue