Warn on function redefinition

A function redefinition usually stems from a bug in the OpenGL specs, or
a bug in the spec converter. The binding generator now logs a warning,
instead of crashing, when a redefinition is encountered.
This commit is contained in:
Stefanos A. 2013-10-31 00:20:05 +01:00
parent 285f238669
commit 97bd6dbc39

View file

@ -251,7 +251,10 @@ namespace Bind
// Merges the given delegate into the delegate list.
internal static void Merge(DelegateCollection delegates, Delegate t)
{
delegates.Add(t.Name, t);
if (!delegates.ContainsKey(t.Name))
delegates.Add(t.Name, t);
else
Console.WriteLine("Function '{0}' redefined", t.Name);
}
#endregion