summaryrefslogtreecommitdiff
path: root/src/gfxinit.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-10 10:25:40 +0000
committerrubidium <rubidium@openttd.org>2009-08-10 10:25:40 +0000
commit40a8bd556e7daa65c3e63059b871f85c8ffce072 (patch)
treeed0986a127b968c52f6e4aac1d1b8f796065a580 /src/gfxinit.cpp
parent8e058c2d27961bdd1db883679b5743f418e8b854 (diff)
downloadopenttd-40a8bd556e7daa65c3e63059b871f85c8ffce072.tar.xz
(svn r17142) -Fix [FS#3103] (r17139): MSVC didn't like some template stuff
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r--src/gfxinit.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index 5ec306a4e..22b97efcb 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -106,7 +106,7 @@ void CheckExternalFiles()
char *add_pos = error_msg;
const char *last = lastof(error_msg);
- for (uint i = 0; i < lengthof(used_set->files); i++) {
+ for (uint i = 0; i < MAX_GFT; i++) {
if (!used_set->files[i].CheckMD5()) {
add_pos += seprintf(add_pos, last, "Your '%s' file is corrupted or missing! %s\n", used_set->files[i].filename, used_set->files[i].missing_warning);
}
@@ -231,8 +231,11 @@ bool MD5File::CheckMD5() const
}
/** Names corresponding to the GraphicsFileType */
+const char *_graphics_file_names[] = { "base", "logos", "arctic", "tropical", "toyland", "extra" };
+
+/** Implementation */
template <class T, size_t Tnum_files>
-/* static */ const char *BaseSet<T, Tnum_files>::file_names[Tnum_files] = { "base", "logos", "arctic", "tropical", "toyland", "extra" };
+/* static */ const char **BaseSet<T, Tnum_files>::file_names = _graphics_file_names;
extern void UpdateNewGRFConfigPalette();