summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-02 01:34:14 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-02 01:34:14 +0000
commit20c98d67894a6fe8c8fac01e841108b5878160db (patch)
treee14a2421b06b5b1152b73154a918960ea69ef990
parent86b89c04ff2fda73c67b0db1ed7239ab00a3225d (diff)
downloadcrawl-ref-20c98d67894a6fe8c8fac01e841108b5878160db.tar.gz
crawl-ref-20c98d67894a6fe8c8fac01e841108b5878160db.zip
Fixing Linux compile warnings and errors. (Although, not the one Johanna is seeing.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7715 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/makefile_tiles.unix2
-rw-r--r--crawl-ref/source/rltiles/tool/tile_list_processor.cc9
-rw-r--r--crawl-ref/source/tilebuf.h1
3 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/makefile_tiles.unix b/crawl-ref/source/makefile_tiles.unix
index f364506d7b..0fd7fdebbb 100644
--- a/crawl-ref/source/makefile_tiles.unix
+++ b/crawl-ref/source/makefile_tiles.unix
@@ -125,7 +125,7 @@ LIB = -L$(LUASRC) -l$(LUALIB) $(LIBDBM) -lpng $(SDL_LDFLAGS) -lGL -lGLU -lSDL_im
INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES) $(PNG_INCLUDE) $(FREETYPE_INCLUDE)
-CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic
+CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic -Wno-parentheses
CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.cc b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
index 4f43f20793..35df77d221 100644
--- a/crawl-ref/source/rltiles/tool/tile_list_processor.cc
+++ b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
@@ -499,7 +499,7 @@ bool tile_list_processor::write_data()
{
if (m_name == "")
{
- fprintf(stderr, "Error: can't write data with no %name specified.\n");
+ fprintf(stderr, "Error: can't write data with no %%name specified.\n");
return false;
}
@@ -649,7 +649,7 @@ bool tile_list_processor::write_data()
fprintf(fp, "#include <map>\n");
fprintf(fp, "#include <string>\n");
fprintf(fp, "#include <assert.h>\n");
- fprintf(fp, "using namespace std;\n");
+ fprintf(fp, "using namespace std;\n\n");
fprintf(fp, "int _tile_%s_count[%s - %s] =\n{\n",
lcname.c_str(), max.c_str(), m_start_value.c_str());
@@ -736,8 +736,7 @@ bool tile_list_processor::write_data()
fprintf(fp,
"tile_%s_map::tile_%s_map()\n"
- "{\n"
- " map<string, int>::iterator itr = begin();\n",
+ "{\n",
lcname.c_str(), lcname.c_str());
for (unsigned int i = 0; i < m_page.m_tiles.size(); i++)
@@ -751,7 +750,7 @@ bool tile_list_processor::write_data()
for (unsigned int c = 0; c < enumname.size(); c++)
lcenum[c] = std::tolower(enumname[c]);
- fprintf(fp, " insert(itr, map<string, int>::value_type(\"%s\", %d + %s));\n",
+ fprintf(fp, " insert(map<string, int>::value_type(\"%s\", %d + %s));\n",
lcenum.c_str(), i, m_start_value.c_str());
}
diff --git a/crawl-ref/source/tilebuf.h b/crawl-ref/source/tilebuf.h
index f1281ec977..6b0ae7eab4 100644
--- a/crawl-ref/source/tilebuf.h
+++ b/crawl-ref/source/tilebuf.h
@@ -13,6 +13,7 @@ class formatted_string;
class GenericTexture;
class TilesTexture;
+#include <string>
#include <vector>
struct VColour