From dcb82310eba497606218d16452bd52753d977b98 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 21 Feb 2013 17:44:29 -0800 Subject: [PATCH] Fix the build when isinf is a macro. --- format.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/format.h b/format.h index 756afe53..5ab4a94f 100644 --- a/format.h +++ b/format.h @@ -176,8 +176,11 @@ inline int SignBit(double value) { } inline int IsInf(double x) { - using namespace std; - return ::isinf(x); +#ifdef isinf + return isinf(x); +#else + return std::isinf(x); +#endif } #else @@ -816,10 +819,10 @@ typedef BasicWriter WWriter; // The default formatting function. template -void Format(BasicWriter &f, const FormatSpec &spec, const T &value) { +void Format(BasicWriter &w, const FormatSpec &spec, const T &value) { std::basic_ostringstream os; os << value; - f.Write(os.str(), spec); + w.Write(os.str(), spec); } namespace internal {