Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6680)

Unified Diff: Source/wtf/dtoa/cached-powers.cc

Issue 57433008: Declare kCachedPowersLength only if !ASSERT_DISABLED (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ASSERT_DISABLED define Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/dtoa/cached-powers.cc
diff --git a/Source/wtf/dtoa/cached-powers.cc b/Source/wtf/dtoa/cached-powers.cc
index 284dea10edabb2975ae3c24c4a062d67476d9056..a40d4878ad88a6916fcb730a9d9e34e6c9c220cc 100644
--- a/Source/wtf/dtoa/cached-powers.cc
+++ b/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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698