Browse Source

Minor formatting fixes.

pull/1514/head
Joao Matos 5 years ago committed by João Matos
parent
commit
7f0dc8aed4
  1. 6
      src/CppParser/Bootstrap/Bootstrap.cs
  2. 2
      src/Generator/Generators/C/CppMarshal.cs

6
src/CppParser/Bootstrap/Bootstrap.cs

@ -1352,12 +1352,14 @@ namespace CppSharp @@ -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)

2
src/Generator/Generators/C/CppMarshal.cs

@ -497,7 +497,9 @@ namespace CppSharp.Generators.Cpp @@ -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);

Loading…
Cancel
Save