Skip to content
Snippets Groups Projects
Commit f73fc5f7 authored by René Fritze's avatar René Fritze
Browse files

more (pedantic) warnings fixed

parent b60e6a5e
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ public:
, loglevel_(loglevel)
, logflags_(logflags)
, suspended_logflags_(logflags)
, is_suspended_(false)
{
}
......@@ -248,6 +249,7 @@ public:
protected:
Logging()
: matlabLogStreamPtr(0)
{
streamIDs_.push_back(LOG_ERR);
streamIDs_.push_back(LOG_DEBUG);
......@@ -548,6 +550,9 @@ private:
MatlabLogStream* matlabLogStreamPtr;
friend Logging& Logger();
// satisfy stricter warnings wrt copying
Logging(const Logging&);
Logging& operator=(const Logging&);
};
/// global Logging instance
......
......@@ -283,11 +283,11 @@ public:
, eps_(eps)
, rows_(local_matrix_.rows())
, cols_(local_matrix_.columns())
, entries_(rows_ * cols_, FieldType(0.0))
{
entries_.resize(rows_ * cols_, 0.0);
}
void add(const int row, const int col, const FieldType val)
inline void add(const int row, const int col, const FieldType val)
{
entries_[row * cols_ + col] += val;
}
......@@ -296,7 +296,7 @@ public:
{
for (int i = 0; i < rows_; ++i) {
for (int j = 0; j < cols_; ++j) {
const FieldType i_j = entries_[i * cols_ + j];
const FieldType& i_j = entries_[i * cols_ + j];
if (std::fabs(i_j) > eps_)
local_matrix_.add(i, j, i_j);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment