AppModel/C++/JSON/Script: Don't output generic method definitions (no compiled code)

This commit is contained in:
Katy Coe
2020-08-04 05:14:19 +02:00
parent 86dec121e5
commit eb55e5b527
3 changed files with 11 additions and 5 deletions

View File

@@ -163,7 +163,7 @@ typedef size_t uintptr_t;
writeCode("using namespace app;");
writeLine("");
foreach (var method in model.Methods.Values) {
foreach (var method in model.Methods.Values.Where(m => m.HasCompiledCode)) {
var arguments = string.Join(", ", method.CppFnPtrType.Arguments.Select(a => a.Type.Name + " " + (a.Name == "this" ? "__this" : a.Name)));
writeCode($"DO_APP_FUNC(0x{method.MethodCodeAddress - model.Package.BinaryImage.ImageBase:X8}, {method.CppFnPtrType.ReturnType.Name}, "
+ $"{method.CppFnPtrType.Name}, ({arguments}));");