Skip to content
Snippets Groups Projects
Commit 1f29d7a5 authored by Christian Engwer's avatar Christian Engwer
Browse files

[blockvector]

initialize result with 0
(patch by Matthias Wohlmuth)

[[Imported from SVN: r1659]]
parent 23e9891c
Branches
Tags
No related merge requests found
......@@ -130,7 +130,7 @@ namespace Dune {
typename PromotionTraits<field_type,typename OtherB::field_type>::PromotedType operator* (const block_vector_unmanaged<OtherB,OtherA>& y) const
{
typedef typename PromotionTraits<field_type,typename OtherB::field_type>::PromotedType PromotedType;
PromotedType sum = PromotedType();
PromotedType sum(0);
#ifdef DUNE_ISTL_WITH_CHECKING
if (this->n!=y.N()) DUNE_THROW(ISTLError,"vector size mismatch");
#endif
......@@ -151,7 +151,7 @@ namespace Dune {
typename PromotionTraits<field_type,typename OtherB::field_type>::PromotedType dot(const block_vector_unmanaged<OtherB,OtherA>& y) const
{
typedef typename PromotionTraits<field_type,typename OtherB::field_type>::PromotedType PromotedType;
PromotedType sum = PromotedType();
PromotedType sum(0);
#ifdef DUNE_ISTL_WITH_CHECKING
if (this->n!=y.N()) DUNE_THROW(ISTLError,"vector size mismatch");
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment