From 7dd0014caa6c6c5be37cfc595bb2000e2d67462e Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Thu, 29 Dec 2005 11:15:28 +0000 Subject: [PATCH] Section 3.6.2 clause 2 of the c++ standard basically says we cannot rely on the order of initialization. --- stepmania/src/BannerCache.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BannerCache.cpp b/stepmania/src/BannerCache.cpp index 5b7e5e6a5c..c0e1bd0067 100644 --- a/stepmania/src/BannerCache.cpp +++ b/stepmania/src/BannerCache.cpp @@ -21,8 +21,10 @@ #include "Banner.h" -const CString BANNER_CACHE_INDEX = SpecialFiles::CACHE_DIR + "banners.cache"; - +/* Neither a global or a file scope static can be used for this because + * the order of initialization of nonlocal objects is unspecified. */ +//const CString BANNER_CACHE_INDEX = SpecialFiles::CACHE_DIR + "banners.cache"; +#define BANNER_CACHE_INDEX (SpecialFiles::CACHE_DIR + "banners.cache") /* Call CacheBanner to cache a banner by path. If the banner is already * cached, it'll be recreated. This is efficient if the banner hasn't changed,