]> rtime.felk.cvut.cz Git - hubacji1/rrts.git/commitdiff
Finish algorithm when it should stop
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 7 Oct 2019 10:36:47 +0000 (12:36 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 7 Oct 2019 10:36:48 +0000 (12:36 +0200)
src/rrts.cc

index a11082f77e85e0e8f026fdd58ec3212c40516617..3900cf6bfda796a64875be49a85f3f0d73cbf1cc 100644 (file)
@@ -259,7 +259,7 @@ bool RRTS::next()
                 this->tstart_ = std::chrono::high_resolution_clock::now();
         bool next = true;
         if (this->should_stop())
-                next = false;
+                return false;
         this->sample();
         this->steer(
                 *this->nn(this->samples().back()),