mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-11 16:55:28 +00:00
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
|
@ -103,8 +103,10 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
void GenerateInitialize (StreamWriter sw)
|
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 ("\t\tstatic int class_offset = 2 * IntPtr.Size;"); // Class size of GTypeInterface struct
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
}
|
||||||
sw.WriteLine ("\t\tstatic void Initialize (IntPtr ptr, IntPtr data)");
|
sw.WriteLine ("\t\tstatic void Initialize (IntPtr ptr, IntPtr data)");
|
||||||
sw.WriteLine ("\t\t{");
|
sw.WriteLine ("\t\t{");
|
||||||
if (interface_vms.Count > 0) {
|
if (interface_vms.Count > 0) {
|
||||||
|
|
Loading…
Reference in a new issue