summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tiletex.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-12-27 16:09:04 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-12-27 18:54:40 +0100
commit05f29f41b6f8d64da8de9aa55c91cd9d2ddf0ff3 (patch)
tree2127ead5f1c433732b1cb15a6cfcd68236725ed1 /crawl-ref/source/tiletex.cc
parent24100b94a1c3f12ad6f31be2584c5de3a5a0c9d4 (diff)
downloadcrawl-ref-05f29f41b6f8d64da8de9aa55c91cd9d2ddf0ff3.tar.gz
crawl-ref-05f29f41b6f8d64da8de9aa55c91cd9d2ddf0ff3.zip
Make most of initialized data static.
All or almost all of .data segment that is not referenced externally should be done.
Diffstat (limited to 'crawl-ref/source/tiletex.cc')
-rw-r--r--crawl-ref/source/tiletex.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc
index db85962771..478af454b1 100644
--- a/crawl-ref/source/tiletex.cc
+++ b/crawl-ref/source/tiletex.cc
@@ -82,7 +82,7 @@ void TilesTexture::set_info(int tile_max, tile_info_func *info_func)
}
// This array should correspond to the TEX_ enum.
-const char *ImageManager::filenames[TEX_MAX] =
+static const char *_filenames[TEX_MAX] =
{
"floor.png",
"wall.png",
@@ -90,7 +90,7 @@ const char *ImageManager::filenames[TEX_MAX] =
"player.png",
"main.png",
"gui.png",
- "icons.png"
+ "icons.png",
};
ImageManager::ImageManager()
@@ -107,9 +107,9 @@ bool ImageManager::load_textures(bool need_mips)
MipMapOptions mip = need_mips ?
MIPMAP_CREATE : MIPMAP_NONE;
- for (size_t i = 0; i < sizeof(filenames) / sizeof(filenames[0]); ++i)
+ for (size_t i = 0; i < ARRAYSZ(_filenames); ++i)
{
- if (!m_textures[i].load_texture(filenames[i], mip))
+ if (!m_textures[i].load_texture(_filenames[i], mip))
return (false);
}