Put spdiag() into an anonymous namespace.

This avoids warnings (GCC 4.6) about missing prior function declaration.
This commit is contained in:
Bård Skaflestad 2013-05-08 19:21:09 +02:00
parent 92592672fe
commit a174d4eb51

View File

@ -248,9 +248,10 @@ subset(const Eigen::Array<Scalar, Eigen::Dynamic, 1>& x,
}
AutoDiff::ForwardBlock<double>::M
spdiag(const AutoDiff::ForwardBlock<double>::V& d)
{
namespace {
AutoDiff::ForwardBlock<double>::M
spdiag(const AutoDiff::ForwardBlock<double>::V& d)
{
typedef AutoDiff::ForwardBlock<double>::M M;
const int n = d.size();
@ -261,6 +262,7 @@ spdiag(const AutoDiff::ForwardBlock<double>::V& d)
}
return mat;
}
}
} // Anonymous namespace
#endif // OPM_AUTODIFFHELPERS_HEADER_INCLUDED