~ubuntu-branches/ubuntu/wily/dssp/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/src-matrix.h

  • Committer: Package Import Robot
  • Author(s): Maarten L. Hekkelman, Laszlo Kajan, Maarten L. Hekkelman
  • Date: 2012-05-21 10:00:00 UTC
  • Revision ID: package-import@ubuntu.com-20120521100000-ft7411wq3qejb8qr
Tags: 2.0.4-2
[ Laszlo Kajan ]
* Stick to debhelper compatibility level 7 to enable flawless
  build on Ubuntu Lucid (documented in debian/README.source)

[ Maarten L. Hekkelman ]
* Fix for compiling with gcc 4.7, std::min (Closes: #673434)
* Added the use of dpkg-buildflags to include hardening flags since
  debhelper is still maintained at version 7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: fix for compiling with gcc 4.7
 
2
 [Julian Taylor <jtaylor.debian@googlemail.com>]
 
3
  * Include algorithm and added std::
 
4
Author: Julian Taylor <jtaylor.debian@googlemail.com>
 
5
--- a/src/matrix.h
 
6
+++ b/src/matrix.h
 
7
@@ -14,6 +14,7 @@
 
8
 #include <istream>
 
9
 #include <cassert>
 
10
 #include <stdexcept>
 
11
+#include <algorithm>
 
12
 
 
13
 // --------------------------------------------------------------------
 
14
 // uBlas compatible matrix types
 
15
@@ -310,7 +311,7 @@ matrix<T> operator*(const matrix_base<T>
 
16
 template<typename T>
 
17
 matrix<T> operator-(const matrix_base<T>& lhs, const matrix_base<T>& rhs)
 
18
 {
 
19
-       matrix<T> result(min(lhs.dim_m(), rhs.dim_m()), min(lhs.dim_n(), rhs.dim_n()));
 
20
+       matrix<T> result(std::min(lhs.dim_m(), rhs.dim_m()), std::min(lhs.dim_n(), rhs.dim_n()));
 
21
        
 
22
        for (uint32 i = 0; i < result.dim_m(); ++i)
 
23
        {