summaryrefslogtreecommitdiff
path: root/games/enigma/patches/patch-al
diff options
context:
space:
mode:
Diffstat (limited to 'games/enigma/patches/patch-al')
-rw-r--r--games/enigma/patches/patch-al95
1 files changed, 95 insertions, 0 deletions
diff --git a/games/enigma/patches/patch-al b/games/enigma/patches/patch-al
new file mode 100644
index 00000000000..87ee179d85e
--- /dev/null
+++ b/games/enigma/patches/patch-al
@@ -0,0 +1,95 @@
+diff -Nur enigma-0.81-orig/src/px/array2.hh enigma-0.81/src/px/array2.hh
+--- src/px/array2.hh 2003-05-19 14:14:36.000000000 +0200
++++ src/px/array2.hh 2004-11-11 00:04:26.855388248 +0100
+@@ -70,14 +70,14 @@
+ // Destructor
+ ~Array2() { destroy_elements(); }
+
+- iterator begin() { return first; }
+- iterator end() { return last; }
+- const_iterator begin() const { return first; }
+- const_iterator end() const { return last; }
+- iterator row_begin(size_type y) { return first + y*w; }
+- iterator row_end(size_type y) { return first + y*w + w; }
+- const_iterator row_begin(size_type y) const { return first + y*w; }
+- const_iterator row_end(size_type y) const { return first + y*w + w; }
++ iterator begin() { return this->first; }
++ iterator end() { return this->last; }
++ const_iterator begin() const { return this->first; }
++ const_iterator end() const { return this->last; }
++ iterator row_begin(size_type y) { return this->first + y*w; }
++ iterator row_end(size_type y) { return this->first + y*w + w; }
++ const_iterator row_begin(size_type y) const { return this->first + y*w; }
++ const_iterator row_end(size_type y) const { return this->first + y*w + w; }
+
+
+ void swap(Array2<T,A> &a2);
+@@ -86,13 +86,13 @@
+ size_type height()const { return h; }
+
+
+- T& get(size_type x, size_type y) { return first[y*w+x]; }
+- const T& get(size_type x, size_type y) const { return first[y*w+x]; }
++ T& get(size_type x, size_type y) { return this->first[y*w+x]; }
++ const T& get(size_type x, size_type y) const { return this->first[y*w+x]; }
+ T& operator()(size_type x, size_type y) { return get(x,y); }
+ const T& operator()(size_type x, size_type y) const { return get(x,y); }
+
+ void set(size_type x, size_type y, const T& val) {
+- first[y*w+x] = val;
++ this->first[y*w+x] = val;
+ }
+
+ /*! Fill the array with some value or the default value. */
+@@ -112,19 +112,19 @@
+ Array2<T,A>::Array2(int ww, int hh, const T& val, const A& a)
+ : Array2Base<T,A>(a, ww*hh), w(ww), h(hh)
+ {
+- std::uninitialized_fill(first, last, val);
++ std::uninitialized_fill(this->first, this->last, val);
+ }
+
+ template <class T, class A>
+ Array2<T,A>::Array2(const Array2<T,A> &a)
+ : Array2Base<T,A>(a.alloc, a.last-a.first)
+ {
+- std::uninitialized_copy(a.begin(), a.end(), first);
++ std::uninitialized_copy(a.begin(), a.end(), this->first);
+ }
+
+ template <class T, class A>
+ void Array2<T,A>::destroy_elements() {
+- for (T* p=first; p!=last; ++p)
++ for (T* p=this->first; p!=this->last; ++p)
+ p->~T();
+ }
+
+@@ -132,7 +132,7 @@
+ void Array2<T,A>::fill (const T& val)
+ {
+ destroy_elements();
+- std::uninitialized_fill(first, last, val);
++ std::uninitialized_fill(this->first, this->last, val);
+ }
+
+ /*! Resize the array in place, but discard any old array
+@@ -142,7 +142,7 @@
+ {
+ destroy_elements();
+ Array2Base<T,A>::resize(w_*h_);
+- std::uninitialized_fill(first, last, val);
++ std::uninitialized_fill(this->first, this->last, val);
+ w = w_;
+ h = h_;
+ }
+@@ -150,8 +150,8 @@
+ template <class T, class A>
+ void Array2<T,A>::swap(Array2<T,A> &a2)
+ {
+- std::swap(first, a2.first);
+- std::swap(last, a2.last);
++ std::swap(this->first, a2.first);
++ std::swap(this->last, a2.last);
+ std::swap(w, a2.w);
+ std::swap(h, a2.h);
+ }