Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2013-01-20 17:43:19 +0400
committerKenneth Heafield <github@kheafield.com>2013-01-20 17:43:19 +0400
commitcfe7d00ea279717e730881b98795d510a9c30d26 (patch)
treef852cfeb7e39b1e1b9052fd30de340e4c2a5194d /util/double-conversion
parenta52d97f99f743b81781d1106c9a17266b901ee6f (diff)
Compiler warnings, rename to ${binary}_main.cc
Diffstat (limited to 'util/double-conversion')
-rw-r--r--util/double-conversion/strtod.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/double-conversion/strtod.cc b/util/double-conversion/strtod.cc
index 9758989f7..e298766a2 100644
--- a/util/double-conversion/strtod.cc
+++ b/util/double-conversion/strtod.cc
@@ -506,7 +506,9 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_previous = Double(double_guess).PreviousDouble();
float f1 = static_cast<float>(double_previous);
+#ifndef NDEBUG
float f2 = float_guess;
+#endif
float f3 = static_cast<float>(double_next);
float f4;
if (is_correct) {
@@ -515,7 +517,9 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_next2 = Double(double_next).NextDouble();
f4 = static_cast<float>(double_next2);
}
+#ifndef NDEBUG
ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
+#endif
// If the guess doesn't lie near a single-precision boundary we can simply
// return its float-value.