Skip to content

Commit 5352b6f

Browse files
committed
Minor code readability refactor.
1 parent 7669dfc commit 5352b6f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/AST/Class.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,14 @@ public class Class : DeclarationContext
9696
// True if the class is final / sealed.
9797
public bool IsFinal { get; set; }
9898

99-
private bool? isOpaque = null;
99+
private bool? isOpaque;
100100

101101
public bool IsInjected { get; set; }
102102

103103
// True if the type is to be treated as opaque.
104104
public bool IsOpaque
105105
{
106-
get
107-
{
108-
return isOpaque == null ? IsIncomplete && CompleteDeclaration == null : isOpaque.Value;
109-
}
106+
get => isOpaque ?? (IsIncomplete && CompleteDeclaration == null);
110107
set
111108
{
112109
isOpaque = value;

src/CLI/CLI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ static void HandleAdditionalArgument(string args, List<string> errorMessages)
152152
options.HeaderFiles.Add(args);
153153
else
154154
{
155-
errorMessages.Add(string.Format("File '{0}' could not be found.", args));
155+
errorMessages.Add($"File '{args}' could not be found.");
156156
}
157157
}
158158
catch(Exception)
159159
{
160-
errorMessages.Add(string.Format("Error while looking for files inside path '{0}'. Ignoring.", args));
160+
errorMessages.Add($"Error while looking for files inside path '{args}'. Ignoring.");
161161
}
162162
}
163163

0 commit comments

Comments
 (0)