Browse Source

Extract CSharpTypePrinter.GetPrimitiveTypeWidth to re-use it in Java type printer.

pull/337/merge
Joao Matos 9 years ago
parent
commit
a298f5c8b5
  1. 14
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

14
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -479,11 +479,9 @@ namespace CppSharp.Generators.CSharp @@ -479,11 +479,9 @@ namespace CppSharp.Generators.CSharp
return type.Type.FullName;
}
static string GetIntString(PrimitiveType primitive, ParserTargetInfo targetInfo)
public static void GetPrimitiveTypeWidth(PrimitiveType primitive,
ParserTargetInfo targetInfo, out uint width, out bool signed)
{
bool signed;
uint width;
switch (primitive)
{
case PrimitiveType.Short:
@ -521,6 +519,14 @@ namespace CppSharp.Generators.CSharp @@ -521,6 +519,14 @@ namespace CppSharp.Generators.CSharp
default:
throw new NotImplementedException();
}
}
static string GetIntString(PrimitiveType primitive, ParserTargetInfo targetInfo)
{
uint width;
bool signed;
GetPrimitiveTypeWidth(primitive, targetInfo, out width, out signed);
switch (width)
{

Loading…
Cancel
Save