From 5a9739c92223101c2b7073e051397e8fa51ef071 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 18 Jun 2010 00:51:12 +0000 Subject: add "volatile" to prevent compiler optimizing away code --- hex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hex.cpp') diff --git a/hex.cpp b/hex.cpp index b6484a5d..5731df55 100644 --- a/hex.cpp +++ b/hex.cpp @@ -28,7 +28,7 @@ void HexDecoder::IsolatedInitialize(const NameValuePairs ¶meters) const int *HexDecoder::GetDefaultDecodingLookupArray() { - static bool s_initialized = false; + static volatile bool s_initialized = false; static int s_array[256]; if (!s_initialized) -- cgit v1.2.1