diff --git a/src/graph/generation/urn_sampler.hh b/src/graph/generation/urn_sampler.hh index 9fb10ea3f8c3378ea3b5531fc8e06c6c7065e9d6..92a6c0165a52c98ded6bf510f5ad178a7f6bcee6 100644 --- a/src/graph/generation/urn_sampler.hh +++ b/src/graph/generation/urn_sampler.hh @@ -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 _urn; - Value _temp; }; } // namespace graph_tool