From 906b7d74a9bd61439aa05181ee4fa3125effc770 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 9 Jul 2000 08:50:47 +0000 Subject: [PATCH] Removed 'inline' that crashed Mingw32 2.95.2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/txtstrm.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index ddada3ddce..8fd6ffaaaf 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -63,7 +63,7 @@ wxChar wxTextInputStream::NextNonSeparators() } -inline bool wxTextInputStream::EatEOL(const wxChar &c) +bool wxTextInputStream::EatEOL(const wxChar &c) { if (c == wxT('\n')) return TRUE; // eat on UNIX @@ -143,12 +143,16 @@ wxUint8 wxTextInputStream::Read8() double wxTextInputStream::ReadDouble() { - /* I only implemented a simple float parser */ - // VZ: what about using strtod()?? (TODO) - double f; - int sign; + /* I only implemented a simple float parser + * VZ: what about using strtod()?? (TODO) + */ + + double f; + int theSign; + + if (!m_input) + return 0; - if (!m_input) return 0; int c = NextNonSeparators(); if (c==(wxChar)0) return 0; @@ -156,22 +160,22 @@ double wxTextInputStream::ReadDouble() if (! (c == wxT('.') || c == wxT(',') || c == wxT('-') || c == wxT('+') || isdigit(c)) ) { m_input.Ungetch(c); - return 0.0; + return 0; } if (c == wxT('-')) { - sign = -1; + theSign = -1; c = m_input.GetC(); } else if (c == wxT('+')) { - sign = 1; + theSign = 1; c = m_input.GetC(); } else { - sign = 1; + theSign = 1; } while (isdigit(c)) @@ -219,8 +223,7 @@ double wxTextInputStream::ReadDouble() m_input.Ungetch(c); } - f *= sign; - + f *= theSign; return f; }