diff --git a/dice.cpp b/dice.cpp index 17193a0..34bf2b8 100644 --- a/dice.cpp +++ b/dice.cpp @@ -15,6 +15,7 @@ void const_roll_table::init(const std::vector& weights) std::queue small; std::queue large; std::vector w; + w.reserve(size); for (int i : weights) { w.push_back(i * size);