Line 0
Link Here
|
|
|
1 |
--- include/VBox/com/array.h.orig 2019-01-25 18:24:04 UTC |
2 |
+++ include/VBox/com/array.h |
3 |
@@ -168,7 +168,7 @@ |
4 |
|
5 |
#include "VBox/com/defs.h" |
6 |
|
7 |
-#if RT_GNUC_PREREQ(4, 6) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) |
8 |
+#if RT_GNUC_PREREQ(4, 6) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(_LIBCPP_VERSION) |
9 |
/** @def VBOX_WITH_TYPE_TRAITS |
10 |
* Type traits are a C++ 11 feature, so not available everywhere (yet). |
11 |
* Only GCC 4.6 or newer and MSVC++ 16.0 (Visual Studio 2010) or newer. |
12 |
@@ -940,12 +940,12 @@ class SafeArray : public Traits (public) |
13 |
*/ |
14 |
T &operator[] (size_t aIdx) |
15 |
{ |
16 |
- AssertReturn(m.arr != NULL, *((T *)NULL)); |
17 |
- AssertReturn(aIdx < size(), *((T *)NULL)); |
18 |
+ AssertReturn(m.arr != NULL, *((T *)1)); |
19 |
+ AssertReturn(aIdx < size(), *((T *)1)); |
20 |
#ifdef VBOX_WITH_XPCOM |
21 |
return m.arr[aIdx]; |
22 |
#else |
23 |
- AssertReturn(m.raw != NULL, *((T *)NULL)); |
24 |
+ AssertReturn(m.raw != NULL, *((T *)1)); |
25 |
return m.raw[aIdx]; |
26 |
#endif |
27 |
} |
28 |
@@ -960,7 +960,7 @@ class SafeArray : public Traits (public) |
29 |
#ifdef VBOX_WITH_XPCOM |
30 |
return m.arr[aIdx]; |
31 |
#else |
32 |
- AssertReturn(m.raw != NULL, *((T *)NULL)); |
33 |
+ AssertReturn(m.raw != NULL, *((T *)1)); |
34 |
return m.raw[aIdx]; |
35 |
#endif |
36 |
} |