summaryrefslogtreecommitdiff
path: root/games/xmoto/patches/xmoto-amd64_gcc441.diff
blob: bc0f47e693b421655396b12f8d88b86b1505b784 (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
http://bugs.gentoo.org/284464

--- src/DBuffer.h.org	2009-09-10 11:58:28.000000000 +0200
+++ src/DBuffer.h	2009-09-10 12:07:30.000000000 +0200
@@ -69,6 +69,8 @@
       void operator >>(unsigned char &c);
       void operator <<(unsigned int n);
       void operator >>(unsigned int &n);
+      void operator <<(unsigned long n);
+      void operator >>(unsigned long &n);
       void operator <<(float n);
       void operator >>(float &n);
       void operator <<(std::string s);

--- src/DBuffer.cpp.org	2009-09-10 11:58:38.000000000 +0200
+++ src/DBuffer.cpp	2009-09-10 12:08:18.000000000 +0200
@@ -210,6 +210,18 @@
     n = (unsigned int) sn;
   }
   
+  void DBuffer::operator <<(unsigned long n) {
+      int sn;
+      sn = (int) (n);
+      *this << sn;
+  }
+  
+  void DBuffer::operator >>(unsigned long &n) {
+      int sn;
+      *this >> sn;
+      n = (unsigned long) sn;
+  }
+  
   void DBuffer::operator <<(float n) {
     writeBuf_LE((char *)&n, sizeof(float));
   }