mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-27 05:35:13 +00:00
Restrict convenience overloads
Only Get*, Gen*, Delete* and New* functions get convenience overloads. This avoids issues with functions such as Rect() that have similar signatures but cannot use such overloads. This restriction will be relaxed in the future.
This commit is contained in:
parent
293c020151
commit
d0e025b86d
|
@ -772,6 +772,8 @@ namespace Bind
|
|||
var r = d.ReturnType;
|
||||
|
||||
bool is_candidate = true;
|
||||
is_candidate &= d.Name.StartsWith("Get") || d.Name.StartsWith("Gen") ||
|
||||
d.Name.StartsWith("Delete") || d.Name.StartsWith("New");
|
||||
is_candidate &= d.Name.EndsWith("v") || d.Name.EndsWith("s");
|
||||
is_candidate &= p.Pointer > 0;
|
||||
is_candidate &= r.CurrentType == "void" && r.Pointer == 0;
|
||||
|
|
Loading…
Reference in a new issue