]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a bug: for a boost::scoped_ptr, the test
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Oct 2009 20:26:31 +0000 (20:26 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Oct 2009 20:26:31 +0000 (20:26 +0000)
  &*ptr != 0
fails if ptr==0 because boost trips on an assertion if we call
operator* on a pointer that's zero.

git-svn-id: https://svn.dealii.org/trunk@19988 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/constraint_matrix.cc

index 6e87a8cca5971bbc3e2c5a7be2894991cf2221a6..c15362443e17d6cea8e9541ccd3a7b3125815f87 100644 (file)
@@ -1879,7 +1879,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
                                   // constraints indicate. Do this only at
                                   // the first call and provide the class
                                   // with a vector for further use.
-  if (&*vec_distribute!=0 || vec_distribute->size()!=vec.size())
+  if (!vec_distribute || vec_distribute->size()!=vec.size())
     {
       std::vector<int> my_indices(vec.local_size());
       unsigned int index2 = 0;

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.