Skip to content

Commit

Permalink
Remove C-style arrays and empty statements
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Sep 17, 2015
1 parent 168cbbf commit 5315d2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lexer.d
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ public:
alias FLAGS_decimal = FLAGS.FLAGS_decimal;
alias FLAGS_unsigned = FLAGS.FLAGS_unsigned;
alias FLAGS_long = FLAGS.FLAGS_long;
;

FLAGS flags = (base == 10) ? FLAGS_decimal : FLAGS_none;
// Parse trailing 'u', 'U', 'l' or 'L' in any combination
const(char)* psuffix = p;
Expand Down
4 changes: 2 additions & 2 deletions src/root/longdouble.d
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ size_t ld_sprint(char* str, int fmt, real x)
// ((1.5 -> 1 -> 1.0) == 1.5) is false
// ((1.0 -> 1 -> 1.0) == 1.0) is true
// see http://en.cppreference.com/w/cpp/io/c/fprintf
char sfmt[5] = "%#Lg\0";
char[5] sfmt = "%#Lg\0";
sfmt[3] = cast(char)fmt;
return sprintf(str, sfmt.ptr, x);
}
else
{
char sfmt[4] = "%Lg\0";
char[4] sfmt = "%Lg\0";
sfmt[2] = cast(char)fmt;
return sprintf(str, sfmt.ptr, x);
}
Expand Down

0 comments on commit 5315d2d

Please sign in to comment.