blob: 36a0612db95d78ad2d0d52f7d28a13d82924988d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
=== modified file 'adchpp/ManagedSocket.cpp'
--- adchpp/ManagedSocket.cpp 2012-09-25 17:00:52 +0000
+++ adchpp/ManagedSocket.cpp 2012-12-26 20:06:52 +0000
@@ -223,10 +223,18 @@
if(failedHandler) {
failedHandler(reason, info);
+ // using nullptr fails on older GCCs for which we're using nullptr.h; using 0 fails on VS...
+#ifndef FAKE_NULLPTR
connectedHandler = nullptr;
readyHandler = nullptr;
dataHandler = nullptr;
failedHandler = nullptr;
+#else
+ connectedHandler = 0;
+ readyHandler = 0;
+ dataHandler = 0;
+ failedHandler = 0;
+#endif
}
}
=== modified file 'adchpp/nullptr.h'
--- adchpp/nullptr.h 2012-06-25 17:11:13 +0000
+++ adchpp/nullptr.h 2012-12-26 20:06:52 +0000
@@ -6,6 +6,8 @@
#ifdef __GNUC__
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) // GCC 4.6 is the first GCC to implement nullptr.
+#define FAKE_NULLPTR
+
const // this is a const object...
class {
public:
|