From bada6666c70977a058755ccf232e7d67b24adeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:21:29 +0200 Subject: New upstream release --- xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx | 32 ++++--------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx') diff --git a/xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx b/xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx index 71760a9..00b2397 100644 --- a/xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx +++ b/xsd/libxsd/xsd/cxx/xml/sax/std-input-source.hxx @@ -1,6 +1,5 @@ // file : xsd/cxx/xml/sax/std-input-source.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_SAX_STD_INPUT_SOURCE_HXX @@ -29,27 +28,14 @@ namespace xsd { } -#if _XERCES_VERSION >= 30000 virtual XMLFilePos curPos () const { return static_cast (is_.tellg ()); } -#else - virtual unsigned int - curPos () const - { - return static_cast (is_.tellg ()); - } -#endif -#if _XERCES_VERSION >= 30000 virtual XMLSize_t readBytes (XMLByte* const buf, const XMLSize_t size) -#else - virtual unsigned int - readBytes (XMLByte* const buf, const unsigned int size) -#endif { // Some implementations don't clear gcount if you // call read() on a stream that is in the eof state. @@ -78,25 +64,17 @@ namespace xsd // Make sure that if we failed, readBytes won't be called // again. // - if (!is_.fail ()) - { -#if _XERCES_VERSION >= 30000 - return static_cast (is_.gcount ()); -#else - return static_cast (is_.gcount ()); -#endif - } - else - return 0; + return !is_.fail () + ? static_cast (is_.gcount ()) + : 0; } -#if _XERCES_VERSION >= 30000 virtual const XMLCh* getContentType () const { return 0; } -#endif + private: std::istream& is_; }; -- cgit v1.2.3