Commit 2b51e4b5 authored by Tiago Peixoto's avatar Tiago Peixoto

Merge branch 'coverity' into 'master'

Simplifications identified with the help of Coverity

See merge request !38
parents 9c3246a4 d1562f86
Pipeline #717 passed with stage
in 67 minutes and 42 seconds
......@@ -127,7 +127,6 @@ private:
vector<size_t> _alias;
uniform_int_distribution<size_t> _sample;
double _S;
size_t _size;
};
// uniform sampling from containers
......
......@@ -61,9 +61,9 @@ public:
else
{
std::swap(_urn[i], _urn.back());
_temp = _urn.back();
Value temp = _urn.back();
_urn.pop_back();
return _temp;
return temp;
}
}
......@@ -73,7 +73,6 @@ public:
private:
vector<Value> _urn;
Value _temp;
};
} // namespace graph_tool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment