Browse Source

Minor code readability refactor.

pull/1139/head
Joao Matos 8 years ago
parent
commit
5352b6f8b0
  1. 7
      src/AST/Class.cs
  2. 4
      src/CLI/CLI.cs

7
src/AST/Class.cs

@ -96,17 +96,14 @@ namespace CppSharp.AST @@ -96,17 +96,14 @@ namespace CppSharp.AST
// True if the class is final / sealed.
public bool IsFinal { get; set; }
private bool? isOpaque = null;
private bool? isOpaque;
public bool IsInjected { get; set; }
// True if the type is to be treated as opaque.
public bool IsOpaque
{
get
{
return isOpaque == null ? IsIncomplete && CompleteDeclaration == null : isOpaque.Value;
}
get => isOpaque ?? (IsIncomplete && CompleteDeclaration == null);
set
{
isOpaque = value;

4
src/CLI/CLI.cs

@ -152,12 +152,12 @@ namespace CppSharp @@ -152,12 +152,12 @@ namespace CppSharp
options.HeaderFiles.Add(args);
else
{
errorMessages.Add(string.Format("File '{0}' could not be found.", args));
errorMessages.Add($"File '{args}' could not be found.");
}
}
catch(Exception)
{
errorMessages.Add(string.Format("Error while looking for files inside path '{0}'. Ignoring.", args));
errorMessages.Add($"Error while looking for files inside path '{args}'. Ignoring.");
}
}

Loading…
Cancel
Save