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:
Stefanos A. 2013-11-10 19:03:49 +01:00
parent 293c020151
commit d0e025b86d

View file

@ -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;