mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-16 11:34:47 +02:00
* generator/ClassBase.cs: Fixed printouts of ctor validation.
Warnings refering to the same ctor were printed multiple times. svn path=/trunk/gtk-sharp/; revision=16563
This commit is contained in:
parent
66d496114a
commit
9d369d8cf9
@ -1,3 +1,8 @@
|
|||||||
|
2003-07-23 Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||||
|
|
||||||
|
* generator/ClassBase.cs: Fixed printouts of ctor validation.
|
||||||
|
Warnings refering to the same ctor were printed multiple times.
|
||||||
|
|
||||||
2003-07-22 John Luke <jluke@cfl.rr.com>
|
2003-07-22 John Luke <jluke@cfl.rr.com>
|
||||||
|
|
||||||
* sample/TreeViewDemo.cs:
|
* sample/TreeViewDemo.cs:
|
||||||
|
@ -156,7 +156,7 @@ namespace GtkSharp.Generation {
|
|||||||
if (prop.Validate ())
|
if (prop.Validate ())
|
||||||
prop.Generate (sw);
|
prop.Generate (sw);
|
||||||
else
|
else
|
||||||
Console.WriteLine(" in Object " + QualifiedName);
|
Console.WriteLine("in Object " + QualifiedName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ namespace GtkSharp.Generation {
|
|||||||
if (sig.Validate ())
|
if (sig.Validate ())
|
||||||
sig.Generate (sw, implementor);
|
sig.Generate (sw, implementor);
|
||||||
else
|
else
|
||||||
Console.WriteLine(" in Object " + QualifiedName);
|
Console.WriteLine("in Object " + QualifiedName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ namespace GtkSharp.Generation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Console.WriteLine(" in Object " + QualifiedName);
|
Console.WriteLine("in Object " + QualifiedName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,29 +316,29 @@ namespace GtkSharp.Generation {
|
|||||||
{
|
{
|
||||||
if (ctors_initted)
|
if (ctors_initted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ArrayList valid_ctors = new ArrayList();
|
||||||
clash_map = new Hashtable();
|
clash_map = new Hashtable();
|
||||||
|
|
||||||
if (ctors != null) {
|
bool has_preferred = false;
|
||||||
bool has_preferred = false;
|
foreach (Ctor ctor in ctors) {
|
||||||
foreach (Ctor ctor in ctors) {
|
if (ctor.Validate ()) {
|
||||||
if (ctor.Validate ()) {
|
ctor.InitClashMap (clash_map);
|
||||||
ctor.InitClashMap (clash_map);
|
if (ctor.Preferred)
|
||||||
if (ctor.Preferred)
|
has_preferred = true;
|
||||||
has_preferred = true;
|
|
||||||
}
|
valid_ctors.Add (ctor);
|
||||||
else
|
|
||||||
Console.WriteLine(" in Object " + QualifiedName);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (!has_preferred && ctors.Count > 0)
|
Console.WriteLine("in Object " + QualifiedName);
|
||||||
((Ctor) ctors[0]).Preferred = true;
|
|
||||||
|
|
||||||
foreach (Ctor ctor in ctors)
|
|
||||||
if (ctor.Validate ()) {
|
|
||||||
ctor.Initialize (clash_map);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
ctors = valid_ctors;
|
||||||
|
|
||||||
|
if (!has_preferred && ctors.Count > 0)
|
||||||
|
((Ctor) ctors[0]).Preferred = true;
|
||||||
|
|
||||||
|
foreach (Ctor ctor in ctors)
|
||||||
|
ctor.Initialize (clash_map);
|
||||||
|
|
||||||
ctors_initted = true;
|
ctors_initted = true;
|
||||||
}
|
}
|
||||||
@ -351,12 +351,8 @@ namespace GtkSharp.Generation {
|
|||||||
klass = klass.Parent;
|
klass = klass.Parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctors != null) {
|
foreach (Ctor ctor in ctors)
|
||||||
foreach (Ctor ctor in ctors) {
|
ctor.Generate (sw);
|
||||||
if (ctor.Validate ())
|
|
||||||
ctor.Generate (sw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!clash_map.ContainsKey("") && hasDefaultConstructor) {
|
if (!clash_map.ContainsKey("") && hasDefaultConstructor) {
|
||||||
sw.WriteLine("\t\tprotected " + Name + "() : base(){}");
|
sw.WriteLine("\t\tprotected " + Name + "() : base(){}");
|
||||||
|
Loading…
Reference in New Issue
Block a user