From 4b6b4491999b48625dfa9fcd18586f3ca81c7258 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Sun, 28 Jul 2019 21:52:51 +0200 Subject: [PATCH] Add vectors static allocation --- src/rrts.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rrts.cc b/src/rrts.cc index 8472ea1..7ee7585 100644 --- a/src/rrts.cc +++ b/src/rrts.cc @@ -149,6 +149,10 @@ void RRTS::set_sample( RRTS::RRTS() : gen_(std::random_device{}()) { + this->goals().reserve(1); + this->nodes().reserve(20000); + this->samples().reserve(1000); + this->steered().reserve(20); this->nodes().push_back(RRTNode()); // root } -- 2.39.2