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 {