generator: Fix compilation warning in some generated interface adapters
Don't generate a static field if it's not going to be used. This fixes a compilation warning on the generated code for interfaces that don't have virtual methods.
This commit is contained in:
parent
0bc9ab9fd4
commit
f0f998ccf3
1 changed files with 4 additions and 2 deletions
|
@ -103,8 +103,10 @@ namespace GtkSharp.Generation {
|
|||
|
||||
void GenerateInitialize (StreamWriter sw)
|
||||
{
|
||||
if (interface_vms.Count > 0) {
|
||||
sw.WriteLine ("\t\tstatic int class_offset = 2 * IntPtr.Size;"); // Class size of GTypeInterface struct
|
||||
sw.WriteLine ();
|
||||
}
|
||||
sw.WriteLine ("\t\tstatic void Initialize (IntPtr ptr, IntPtr data)");
|
||||
sw.WriteLine ("\t\t{");
|
||||
if (interface_vms.Count > 0) {
|
||||
|
|
Loading…
Reference in a new issue