From 89cf1a7029bd93b6e360a8eb1e116d5a5daeb7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 12 Nov 2007 10:06:05 +0000 Subject: [PATCH] Silent some MSVC warnings svn path=/trunk/; revision=30379 --- .../base/shell/explorer/utility/xmlstorage.h | 17 ++++++++++------- reactos/include/psdk/windef.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/reactos/base/shell/explorer/utility/xmlstorage.h b/reactos/base/shell/explorer/utility/xmlstorage.h index 418ad2ec811..dc82544641e 100644 --- a/reactos/base/shell/explorer/utility/xmlstorage.h +++ b/reactos/base/shell/explorer/utility/xmlstorage.h @@ -39,6 +39,9 @@ #ifndef _XMLSTORAGE_H +#ifndef __REACTOS__ +#include +#endif #ifdef UNICODE #ifndef _UNICODE @@ -2242,7 +2245,7 @@ struct fast_ostringbuffer : public std::streambuf typedef std::char_traits<_E> _Tr; explicit fast_ostringbuffer() - {_Init(0, 0, std::_Noread);} // optimized for ios::out mode + {_Init(0, 0, /*std::_Noread*/4);} // optimized for ios::out mode virtual ~fast_ostringbuffer() {_Tidy();} @@ -2271,10 +2274,10 @@ protected: else if (_ALSIZE < _Alsize) _Alsize = _ALSIZE; - if (_Strmode & std::_Allocated) + if (_Strmode & std::strstreambuf::_Allocated) _Al.deallocate(eback(), _Os); - _Strmode |= std::_Allocated; + _Strmode |= std::strstreambuf::_Allocated; if (_Os == 0) {_Seekhigh = _P; @@ -2288,24 +2291,24 @@ protected: return _C;}} - void _Init(const _E *_S, size_t _N, std::_Strstate _M) + void _Init(const _E *_S, size_t _N, std::strstreambuf::_Strstate _M) {_Pendsave = 0, _Seekhigh = 0; _Alsize = _MINSIZE, _Strmode = _M; setg(0, 0, 0); setp(0, 0);} void _Tidy() - {if (_Strmode & std::_Allocated) + {if (_Strmode & std::strstreambuf::_Allocated) _Al.deallocate(eback(), (pptr() != 0 ? epptr() : egptr()) - eback()); _Seekhigh = 0; - _Strmode &= ~std::_Allocated;} + _Strmode &= ~std::strstreambuf::_Allocated;} private: enum {_ALSIZE = 65536/*512*/, _MINSIZE = 32768/*32*/}; // bigger buffer sizes _E *_Pendsave, *_Seekhigh; int _Alsize; - std::_Strstate _Strmode; + std::strstreambuf::_Strstate _Strmode; std::allocator<_E> _Al; }; diff --git a/reactos/include/psdk/windef.h b/reactos/include/psdk/windef.h index 1ddb23cd5dc..67a061c79aa 100644 --- a/reactos/include/psdk/windef.h +++ b/reactos/include/psdk/windef.h @@ -166,7 +166,7 @@ extern "C" { #define min __min #define max __max -#elif !defined(NOMINMAX) +#elif !defined(_MSC_VER) && !defined(NOMINMAX) #ifndef max #define max(a,b) ((a)>(b)?(a):(b))