Skip to content

Commit

Permalink
disabling static asserts in float to string prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenwater committed Apr 24, 2023
1 parent 8c8d467 commit 8c19bf9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/f2s/api/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace sw {
namespace universal {

#define NOW
#define NOW_
#ifdef NOW

// Provides a decimal representation of v.
Expand All @@ -37,10 +37,11 @@ namespace sw {
// Grisu3 will never output representations that lie exactly on a boundary.
F2S boundary_minus, boundary_plus;
w.normalizedBoundaries(boundary_minus, boundary_plus);
assert(boundary_plus.e() == w.e());

std::cout << to_triple(boundary_minus) << '\n';
std::cout << to_triple(boundary_plus) << '\n';
std::cout << to_triple(w) << '\n';
assert(boundary_plus.e() == w.e());

buffer[0] = 0;
length = 0;
decimal_exponent = 0;
Expand Down Expand Up @@ -95,10 +96,11 @@ namespace sw {
#endif
return result;
}

#else
bool Grisu3(double v, char buffer[], int& length, int& decimal_exponent) { return false; }
#endif
}
}
} // namespace universal
} // namespace sw

int main()
try {
Expand Down

0 comments on commit 8c19bf9

Please sign in to comment.