From 3980bd4e3584e470c283ee4d25e3ce773171a09b Mon Sep 17 00:00:00 2001
From: Stephan Hilb <stephan@ecshi.net>
Date: Fri, 2 Sep 2016 12:41:33 +0200
Subject: [PATCH] isValidGraph(): make idxtype a template type

This fixes the clang compiler warnings about tautological compare
when idxtype is unsigned. For clang behaviour see [1].

[1]: https://llvm.org/bugs/show_bug.cgi?id=8682
---
 dune/istl/repartition.hh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dune/istl/repartition.hh b/dune/istl/repartition.hh
index 1dd57d1da..d90b987c2 100644
--- a/dune/istl/repartition.hh
+++ b/dune/istl/repartition.hh
@@ -800,8 +800,9 @@ namespace Dune
       os<<*cur<<" ";
   }
 
-  inline bool isValidGraph(std::size_t noVtx, std::size_t gnoVtx, idxtype noEdges, idxtype* xadj,
-                           idxtype* adjncy, bool checkSymmetry)
+  template<class S, class T>
+  inline bool isValidGraph(std::size_t noVtx, std::size_t gnoVtx, S noEdges, T* xadj,
+                           T* adjncy, bool checkSymmetry)
   {
     bool correct=true;
 
-- 
GitLab