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:
parent
285f238669
commit
97bd6dbc39
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue