From 16062e07fda238071475bd90a9cb15c27f67cd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Fri, 23 Nov 2012 14:03:05 +0000 Subject: [PATCH] Remove unused variable w in fmatrixev.hh. Ignore eigenvaluetest. Reordner member variable assignments to avoid pedantic warnings in shared_ptr. Only activate boundary checking in dynmatrixtest if not already active. [[Imported from SVN: r7063]] --- dune/common/fmatrixev.hh | 3 --- dune/common/shared_ptr.hh | 8 ++++---- dune/common/test/.gitignore | 1 + dune/common/test/dynmatrixtest.cc | 3 +++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dune/common/fmatrixev.hh b/dune/common/fmatrixev.hh index 5b39e74ac..028788afd 100644 --- a/dune/common/fmatrixev.hh +++ b/dune/common/fmatrixev.hh @@ -143,9 +143,6 @@ namespace Dune { const char jobvl = 'n'; const char jobvr = 'n'; - // length of matrix vector - const long int w = N * N ; - // matrix to put into dgeev double matrixVector[dim * dim]; diff --git a/dune/common/shared_ptr.hh b/dune/common/shared_ptr.hh index 3f15acffa..546d09a58 100644 --- a/dune/common/shared_ptr.hh +++ b/dune/common/shared_ptr.hh @@ -187,8 +187,8 @@ namespace Dune /** @brief Constructor from existing Pointer with custom deleter. */ SharedCountImpl(T* elem,const Deleter& deleter) : SharedCount(), - rep_(elem), - deleter_(deleter) + deleter_(deleter), + rep_(elem) {} /** @brief Copy constructor with type conversion. */ SharedCountImpl(const SharedCountImpl& rep) @@ -258,7 +258,7 @@ namespace Dune template<class T> template<class T1> inline shared_ptr<T>::shared_ptr(const shared_ptr<T1>& other) - : rep_(other.rep_), count_(other.count_) + : count_(other.count_), rep_(other.rep_) { if (rep_) ++(count_->count_); @@ -266,7 +266,7 @@ namespace Dune template<class T> inline shared_ptr<T>::shared_ptr(const shared_ptr& other) - : rep_(other.rep_), count_(other.count_) + : count_(other.count_), rep_(other.rep_) { if (rep_) ++(count_->count_); diff --git a/dune/common/test/.gitignore b/dune/common/test/.gitignore index 626cec598..f47a8adb5 100644 --- a/dune/common/test/.gitignore +++ b/dune/common/test/.gitignore @@ -69,3 +69,4 @@ testdebugallocator_fail2 testdebugallocator_fail3 testdebugallocator_fail4 testdebugallocator_fail5 +eigenvaluestest diff --git a/dune/common/test/dynmatrixtest.cc b/dune/common/test/dynmatrixtest.cc index 29c032197..c6e3b15a7 100644 --- a/dune/common/test/dynmatrixtest.cc +++ b/dune/common/test/dynmatrixtest.cc @@ -3,7 +3,10 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +// Activate checking +#ifndef DUNE_ISTL_WITH_CHECKING #define DUNE_ISTL_WITH_CHECKING +#endif #include <dune/common/dynmatrix.hh> #include <dune/common/dynvector.hh> #include <dune/common/fvector.hh> -- GitLab