]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Add vectors static allocation
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Sun, 28 Jul 2019 19:52:51 +0000 (21:52 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Sun, 28 Jul 2019 20:03:11 +0000 (22:03 +0200)
src/rrts.cc

index 8472ea108fc139a3c1c7b914b26068a314ea6996..7ee7585022eaf59e1496129a22da5aed85900b48 100644 (file)
@@ -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
 }