From fd1072218ac561d5f502e41048c9919c09d9ce55 Mon Sep 17 00:00:00 2001 From: Adrian Burri <burriad@dune-project.org> Date: Wed, 11 May 2005 13:19:41 +0000 Subject: [PATCH] Some cleanup after the string conversion [[Imported from SVN: r2044]] --- common/dynamictype.hh | 8 +++++--- common/fvector.hh | 3 +-- common/misc.hh | 7 +++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/common/dynamictype.hh b/common/dynamictype.hh index 976a69c42..fd75e4aed 100644 --- a/common/dynamictype.hh +++ b/common/dynamictype.hh @@ -1,9 +1,10 @@ // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: -#ifndef __DUNE_DYNAMICTYPE_HH__ -#define __DUNE_DYNAMICTYPE_HH__ +#ifndef DUNE_DYNAMICTYPE_HH +#define DUNE_DYNAMICTYPE_HH -#include <assert.h> +#include <cassert> +//#include <iostream> namespace Dune { @@ -37,6 +38,7 @@ namespace Dune { //! return identifier IdentifierType getIdentifier() const { + //std::cout << "Id: " << identifier_ << "(" << undefined << ")" << std::endl; assert(identifier_ != undefined); return identifier_; } diff --git a/common/fvector.hh b/common/fvector.hh index c90dadc8c..a13f8bf6d 100644 --- a/common/fvector.hh +++ b/common/fvector.hh @@ -472,13 +472,12 @@ namespace Dune { //===== assignment from scalar //! Assignment operator for scalar - FieldVector& operator= (const K& k) + const FieldVector& operator= (const K& k) { fvmeta_assignscalar<n-1>::assignscalar(*this,k); return *this; } - //===== access to components //! random access diff --git a/common/misc.hh b/common/misc.hh index 3e85ae1e4..b29d1840f 100644 --- a/common/misc.hh +++ b/common/misc.hh @@ -40,7 +40,10 @@ namespace Dune { // //******************************************************************** - inline std::basic_string<char> genFilename(std::basic_string <char> path, std::basic_string <char> fn, int ntime, int precision = 6) + inline std::string genFilename(const std::string& path, + const std::string& fn, + int ntime, + int precision = 6) { std::ostringstream name; @@ -72,7 +75,7 @@ namespace Dune { name << cp; // here implicitly a string is generated - return name.str().c_str(); + return name.str(); } /** @} */ -- GitLab