summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit
diff options
context:
space:
mode:
authorch.dumez@samsung.com <ch.dumez@samsung.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-11-05 00:38:34 +0000
committerch.dumez@samsung.com <ch.dumez@samsung.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-11-05 00:38:34 +0000
commit70ea9e407b389247baf07bd566d99fc6d2ab0077 (patch)
tree63841667b281d3cd5aaa1977035fe58a5f078f03 /third_party/WebKit
parent0930a232e1701ca1b7a27e4bbd1f53a50c1e6747 (diff)
downloadchromium_src-70ea9e407b389247baf07bd566d99fc6d2ab0077.zip
chromium_src-70ea9e407b389247baf07bd566d99fc6d2ab0077.tar.gz
chromium_src-70ea9e407b389247baf07bd566d99fc6d2ab0077.tar.bz2
Declare kCachedPowersLength only if !ASSERT_DISABLED
The kCachedPowersLength global static variable is only used in assertions so we should only declare it if !ASSERT_DISABLED to avoid warnings at compile time. R=eseidel, thakis BUG=312287 NOTRY=true Review URL: https://codereview.chromium.org/57433008 git-svn-id: svn://svn.chromium.org/blink/trunk@161295 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit')
-rw-r--r--third_party/WebKit/Source/wtf/dtoa/cached-powers.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/wtf/dtoa/cached-powers.cc b/third_party/WebKit/Source/wtf/dtoa/cached-powers.cc
index 284dea1..a40d487 100644
--- a/third_party/WebKit/Source/wtf/dtoa/cached-powers.cc
+++ b/third_party/WebKit/Source/wtf/dtoa/cached-powers.cc
@@ -135,7 +135,6 @@ namespace double_conversion {
{UINT64_2PART_C(0xeb96bf6e, badf77d9), 1039, 332},
{UINT64_2PART_C(0xaf87023b, 9bf0ee6b), 1066, 340},
};
- static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
static const int kCachedPowersOffset = 348; // -kCachedPowers[0].decimal_exponent
const int PowersOfTenCache::kDecimalExponentDistance = 8; // kCachedPowers[1].decimal_exponent - kCachedPowers[0].decimal_exponent
@@ -143,6 +142,10 @@ namespace double_conversion {
const int PowersOfTenCache::kMaxDecimalExponent = 340; // kCachedPowers[kCachedPowersLength - 1].decimal_exponent
#ifndef NDEBUG
+#if !ASSERT_DISABLED
+ static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
+#endif
+
// Check that the static constants match the values in kCachedPowers.
static void validateStaticConstants() {
ASSERT(kCachedPowersOffset == -kCachedPowers[0].decimal_exponent);