Add .gitignore and use ASSERT instead of assert.
Both changes from Martin Olsson.
Fixes issue 21 and 22.
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3e9e1b5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.sconsign.dblite
+run_tests
+*.o
diff --git a/src/double-conversion.cc b/src/double-conversion.cc
index f0d332b..c3149e8 100644
--- a/src/double-conversion.cc
+++ b/src/double-conversion.cc
@@ -161,7 +161,7 @@
double value,
StringBuilder* result_builder,
DoubleToStringConverter::DtoaMode mode) const {
- assert(mode == SHORTEST || mode == SHORTEST_SINGLE);
+ ASSERT(mode == SHORTEST || mode == SHORTEST_SINGLE);
if (Double(value).IsSpecial()) {
return HandleSpecialValues(value, result_builder);
}
diff --git a/src/fast-dtoa.cc b/src/fast-dtoa.cc
index 0609422..1a0f823 100644
--- a/src/fast-dtoa.cc
+++ b/src/fast-dtoa.cc
@@ -529,7 +529,7 @@
if (mode == FAST_DTOA_SHORTEST) {
Double(v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
} else {
- assert(mode == FAST_DTOA_SHORTEST_SINGLE);
+ ASSERT(mode == FAST_DTOA_SHORTEST_SINGLE);
float single_v = static_cast<float>(v);
Single(single_v).NormalizedBoundaries(&boundary_minus, &boundary_plus);
}
diff --git a/src/strtod.cc b/src/strtod.cc
index d5abc93..1f5fd66 100644
--- a/src/strtod.cc
+++ b/src/strtod.cc
@@ -515,7 +515,7 @@
double double_next2 = Double(double_next).NextDouble();
f4 = static_cast<float>(double_next2);
}
- assert(f1 <= f2 && f2 <= f3 && f3 <= f4);
+ ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
// If the guess doesn't lie near a single-precision boundary we can simply
// return its float-value.
@@ -523,7 +523,7 @@
return float_guess;
}
- assert((f1 != f2 && f2 == f3 && f3 == f4) ||
+ ASSERT((f1 != f2 && f2 == f3 && f3 == f4) ||
(f1 == f2 && f2 != f3 && f3 == f4) ||
(f1 == f2 && f2 == f3 && f3 != f4));