Browse Source

Minor code formatting changes.

pull/761/head
Joao Matos 9 years ago
parent
commit
dc998d391e
  1. 8
      src/AST/Module.cs
  2. 3
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

8
src/AST/Module.cs

@ -33,11 +33,11 @@ namespace CppSharp.AST @@ -33,11 +33,11 @@ namespace CppSharp.AST
if (string.IsNullOrEmpty(inlinesLibraryName))
{
if (string.IsNullOrEmpty(OutputNamespace))
{
return string.Format("{0}-inlines", LibraryName);
}
return string.Format("{0}-inlines", OutputNamespace);
}
return inlinesLibraryName;
}
set { inlinesLibraryName = value; }
@ -50,11 +50,11 @@ namespace CppSharp.AST @@ -50,11 +50,11 @@ namespace CppSharp.AST
if (string.IsNullOrEmpty(templatesLibraryName))
{
if (string.IsNullOrEmpty(OutputNamespace))
{
return string.Format("{0}-templates", LibraryName);
}
return string.Format("{0}-templates", OutputNamespace);
}
return templatesLibraryName;
}
set { templatesLibraryName = value; }

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

@ -704,8 +704,10 @@ namespace CppSharp.Generators.CSharp @@ -704,8 +704,10 @@ namespace CppSharp.Generators.CSharp
names.Push(decl.Name);
ctx = decl.Namespace;
}
if (decl is Variable && !(decl.Namespace is Class))
names.Push(decl.TranslationUnit.FileNameWithoutExtension);
while (!(ctx is TranslationUnit))
{
if (!string.IsNullOrWhiteSpace(ctx.Name))
@ -713,6 +715,7 @@ namespace CppSharp.Generators.CSharp @@ -713,6 +715,7 @@ namespace CppSharp.Generators.CSharp
ctx = ctx.Namespace;
}
if (!ctx.TranslationUnit.IsSystemHeader && ctx.TranslationUnit.IsValid &&
!string.IsNullOrWhiteSpace(ctx.TranslationUnit.Module.OutputNamespace))
names.Push(ctx.TranslationUnit.Module.OutputNamespace);

Loading…
Cancel
Save