Skip to content

Commit

Permalink
Merge pull request bhelyer#4 from simendsjo/master
Browse files Browse the repository at this point in the history
Remove warning
  • Loading branch information
bhelyer committed Feb 21, 2012
2 parents f88e09f + ba0d223 commit 223fd7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Gnu make Makefile for libtcod-d

DMD = dmd

ifeq "" '$(COMSPEC)'

Platform := Unix
Expand Down Expand Up @@ -31,6 +34,12 @@ endef
$(error $(message))
endif

# For now, 32 bit is the default model
# PS: copied from phobos
ifeq (,$(MODEL))
MODEL:=32
endif

functions.d_gen := source/tcod/c/functions.d
generated_sources := $(functions.d_gen)

Expand All @@ -41,7 +50,7 @@ genfuncs.d := source/genfunctionsmod.d
function_list.txt := source/functionlist.txt

$(functions.d_gen) : $(genfuncs.d) $(function_list.txt)
dmd -run $(genfuncs.d) \
$(DMD) -m$(MODEL) -run $(genfuncs.d) \
< $(function_list.txt) \
> $@

Expand Down
3 changes: 2 additions & 1 deletion examples/makefile-d-sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DMD=dmd
DFLAGS=-gc -debug -w -unittest
MODEL=32
DFLAGS=-m$(MODEL) -gc -debug -w -unittest
DLDFLAGS=-of$(EXE) -L-ldl
EXE=samples_d

Expand Down
2 changes: 1 addition & 1 deletion examples/samples_d.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ColoursSample : Sample
string name() { return " True colors "; }
void render(bool first, ref TCOD_key_t key)
{
enum { TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT };
enum { TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT }
// Random corner colours.
static TCOD_color_t[4] cols = [{50,40,150},{240,85,5},{50,35,240},{10,200,130}];
static int[4] dirr = [1, -1, 1, 1], dirg = [1, -1, -1, 1], dirb = [1, 1, 1, -1];
Expand Down
4 changes: 2 additions & 2 deletions source/genfunctionsmod.d
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
module genfunctionsmod;

import std.stdio;
import std.ctype;
import std.ascii : isWhite;
import std.string;


Expand Down Expand Up @@ -115,7 +115,7 @@ bool emptyOrWhitespace(T)(T s)
{
bool emptyOrWhite = true;
foreach (c; s) {
if (!isspace(c)) {
if (!isWhite(c)) {
emptyOrWhite = false;
break;
}
Expand Down

0 comments on commit 223fd7e

Please sign in to comment.