diff --git a/src/CppParser/Bootstrap/Bootstrap.cs b/src/CppParser/Bootstrap/Bootstrap.cs index 836edfe8..319a0712 100644 --- a/src/CppParser/Bootstrap/Bootstrap.cs +++ b/src/CppParser/Bootstrap/Bootstrap.cs @@ -1352,12 +1352,14 @@ namespace CppSharp WriteLine($"_S->{fieldName} = WalkTemplateArgument(S->{methodName}());"); else if (typeName.Contains("QualifiedType")) WriteLine($"_S->{fieldName} = GetQualifiedType(S->{methodName}());"); - else if (fieldName == "value" && @class.Bases.Exists(b => b.Class.Name.Contains("AP"))) { + else if (fieldName == "value" && @class.Bases.Exists(b => b.Class.Name.Contains("AP"))) + { // Use llvm::APInt or llvm::APFloat conversion methods methodName = property.Type.IsPrimitiveType(PrimitiveType.ULongLong) ? "getLimitedValue" : "convertToDouble"; WriteLine($"_S->{fieldName} = S->getValue().{methodName}();"); - } else + } + else WriteLine($"_S->{fieldName} = S->{methodName}();"); if (validMethodExists) diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index e7b95876..2c1c7bee 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -103,7 +103,7 @@ namespace CppSharp break; case ParserResultKind.FileNotFound: Diagnostics.Error("File{0} not found: '{1}'", - (files.Count() > 1) ? "s" : "", string.Join(",", files)); + (files.Count() > 1) ? "s" : "", string.Join(",", files)); hasParsingErrors = true; break; } @@ -349,13 +349,13 @@ namespace CppSharp compilerOptions.Append(" /unsafe"); var compilerParameters = new CompilerParameters - { - GenerateExecutable = false, - TreatWarningsAsErrors = false, - OutputAssembly = assemblyFile, - GenerateInMemory = false, - CompilerOptions = compilerOptions.ToString() - }; + { + GenerateExecutable = false, + TreatWarningsAsErrors = false, + OutputAssembly = assemblyFile, + GenerateInMemory = false, + CompilerOptions = compilerOptions.ToString() + }; if (module != Options.SystemModule) compilerParameters.ReferencedAssemblies.Add( diff --git a/src/Generator/Generators/C/CppMarshal.cs b/src/Generator/Generators/C/CppMarshal.cs index bca2c56a..9e81ea7a 100644 --- a/src/Generator/Generators/C/CppMarshal.cs +++ b/src/Generator/Generators/C/CppMarshal.cs @@ -497,7 +497,9 @@ namespace CppSharp.Generators.Cpp // Use the original typedef name if available, otherwise just use the function pointer type string cppTypeName; if (!decl.IsSynthetized) + { cppTypeName = "::" + typedef.Declaration.QualifiedOriginalName; + } else { cppTypeName = decl.Type.Visit(typePrinter, quals);