[Libreoffice-commits] .: Branch 'libreoffice-3-5-6' - comphelper/inc
Petr Mladek
pmladek at kemper.freedesktop.org
Tue Aug 7 06:22:24 PDT 2012
comphelper/inc/comphelper/newarray.hxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7c54bf9f6a4d6d162b3af587612e6c65eaee9831
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Thu Aug 2 10:16:40 2012 +0200
Fix windows build where min and max are macros
Change-Id: I59186db4003564b0b9c202456b7fdf91eaa67751
Signed-off-by: Petr Mladek <pmladek at suse.cz>
Signed-off-by: Tor Lillqvist <tlillqvist at suse.com>
Signed-off-by: Andras Timar <atimar at suse.com>
diff --git a/comphelper/inc/comphelper/newarray.hxx b/comphelper/inc/comphelper/newarray.hxx
index 28d2846..6565c17 100644
--- a/comphelper/inc/comphelper/newarray.hxx
+++ b/comphelper/inc/comphelper/newarray.hxx
@@ -37,7 +37,7 @@ namespace comphelper {
template<typename T> T *
newArray_null(size_t const n) throw()
{
- if ((::std::numeric_limits<size_t>::max() / sizeof(T)) <= n) {
+ if (((::std::numeric_limits<size_t>::max)() / sizeof(T)) <= n) {
return 0;
}
return new (::std::nothrow) T[n];
@@ -46,7 +46,7 @@ newArray_null(size_t const n) throw()
template<typename T> T *
newArray_ex(size_t const n)
{
- if ((::std::numeric_limits<size_t>::max() / sizeof(T)) <= n) {
+ if (((::std::numeric_limits<size_t>::max)() / sizeof(T)) <= n) {
throw ::std::bad_alloc();
}
return new T[n];
More information about the Libreoffice-commits
mailing list