]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cppcheck: avoid an unused variable 8141/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 13 May 2019 15:45:33 +0000 (10:45 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 13 May 2019 15:45:47 +0000 (10:45 -0500)
source/base/table_handler.cc

index 6342e4f57fc20850f9e0b1e57bd6742bb98607a7..a126973c837b1f316b4d82d19e627741665ef8f2 100644 (file)
@@ -752,13 +752,15 @@ TableHandler::n_rows() const
     return 0;
 
   std::map<std::string, Column>::const_iterator col_iter = columns.begin();
-  unsigned int n          = col_iter->second.entries.size();
-  std::string  first_name = col_iter->first;
+  unsigned int n = col_iter->second.entries.size();
 
+#ifdef DEBUG
+  std::string first_name = col_iter->first;
   for (++col_iter; col_iter != columns.end(); ++col_iter)
     Assert(col_iter->second.entries.size() == n,
            ExcWrongNumberOfDataEntries(
              col_iter->first, col_iter->second.entries.size(), first_name, n));
+#endif
 
   return n;
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.