]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small fixes. 3318/head
authorLukas Korous <lukas.korous@gmail.com>
Sun, 30 Oct 2016 12:13:06 +0000 (13:13 +0100)
committerLukas Korous <lukas.korous@gmail.com>
Sun, 30 Oct 2016 12:15:00 +0000 (13:15 +0100)
include/deal.II/lac/trilinos_sparsity_pattern.h
source/base/utilities.cc

index aaee461a1de1728e5cbffbc1b1a65614977f2821..856c3bb29e9132cb3cad785464608ba895abb270 100644 (file)
@@ -53,6 +53,7 @@ namespace TrilinosWrappers
 {
   // forward declarations
   class SparsityPattern;
+  class SparseMatrix;
 
   namespace SparsityPatternIterators
   {
@@ -1164,7 +1165,7 @@ namespace TrilinosWrappers
      */
     std_cxx11::shared_ptr<Epetra_CrsGraph> nonlocal_graph;
 
-    friend class SparseMatrix;
+    friend class TrilinosWrappers::SparseMatrix;
     friend class SparsityPatternIterators::Accessor;
     friend class SparsityPatternIterators::Iterator;
   };
index dfdcd893644c463c1e6e564aa388153fd3c8a27b..66055ba1ab4f9c8436545d0049b81a3c322a684b 100644 (file)
@@ -132,7 +132,7 @@ namespace Utilities
   trim(const std::string &input)
   {
     std::string::size_type left = 0;
-    std::string::size_type right = input.size() - 1;
+    std::string::size_type right = input.size() > 0 ? input.size() - 1 : 0;
 
     for (; left < input.size(); ++left)
       {

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.