From 87071c47936628bf032027ac7b90786ace84b0a3 Mon Sep 17 00:00:00 2001
From: Rene Milk <rene.milk@uni-muenster.de>
Date: Tue, 4 Jun 2013 11:23:39 +0200
Subject: [PATCH] [common] fixup spmatrix gnuplot

---
 dune/stuff/common/print.hh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dune/stuff/common/print.hh b/dune/stuff/common/print.hh
index 2298398b7..a41d71a8c 100644
--- a/dune/stuff/common/print.hh
+++ b/dune/stuff/common/print.hh
@@ -469,8 +469,9 @@ void matrixToGnuplotStream(const Matrix& matrix, std::ostream& stream)
 {
   unsigned long nz = 0;
 
-  for (size_t row = 0; row < matrix.rows(); ++row) {
-    for (size_t col = 0; col < matrix.cols(); ++col) {
+  // don't try to be clever and use an unsigned counter here
+  for (int row = 0; row < matrix.rows(); ++row) {
+    for (int col = 0; col < matrix.cols(); ++col) {
       if (matrix.find(row, col))
         stream << row << "\t" << col << "\t" << matrix(row, col) << std::endl;
     }
-- 
GitLab