From 7775be7b663c1d821b60ed306593fb46989c1b05 Mon Sep 17 00:00:00 2001 From: Lukas Korous Date: Sun, 30 Oct 2016 13:13:06 +0100 Subject: [PATCH] Small fixes. --- include/deal.II/lac/trilinos_sparsity_pattern.h | 3 ++- source/base/utilities.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/trilinos_sparsity_pattern.h b/include/deal.II/lac/trilinos_sparsity_pattern.h index aaee461a1d..856c3bb29e 100644 --- a/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -53,6 +53,7 @@ namespace TrilinosWrappers { // forward declarations class SparsityPattern; + class SparseMatrix; namespace SparsityPatternIterators { @@ -1164,7 +1165,7 @@ namespace TrilinosWrappers */ std_cxx11::shared_ptr nonlocal_graph; - friend class SparseMatrix; + friend class TrilinosWrappers::SparseMatrix; friend class SparsityPatternIterators::Accessor; friend class SparsityPatternIterators::Iterator; }; diff --git a/source/base/utilities.cc b/source/base/utilities.cc index dfdcd89364..66055ba1ab 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -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) { -- 2.39.5