Skip to content

Commit

Permalink
fix blank line issue when no namespace is declared
Browse files Browse the repository at this point in the history
  • Loading branch information
kaienkira committed Aug 8, 2017
1 parent f795db6 commit 24a4265
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/src/Brickred.Exchange.Compiler/CppCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ private string GenerateHeaderFile()
sb.Append(includeFileDecl);
sb.Append(this.newLineStr);
sb.Append(classForwardDecl);
sb.Append(namespaceDeclStart);
if (declList.Count > 0) {
if (namespaceDeclStart != "") {
sb.Append(namespaceDeclStart);
sb.Append(this.newLineStr);
}
if (declList.Count > 0) {
sb.Append(string.Join(this.newLineStr, declList));
sb.Append(this.newLineStr);
}
Expand Down

0 comments on commit 24a4265

Please sign in to comment.