Skip to content

Commit

Permalink
moving parameter 't' to avoid unnecessary copies
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Yuki Imamura <[email protected]>
  • Loading branch information
LucasYuki committed Nov 24, 2024
1 parent 40f3c1a commit f1f1ffa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stt/src/SteinerTreeBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "stt/SteinerTreeBuilder.h"

#include <map>
#include <utility>
#include <vector>

#include "odb/db.h"
Expand Down Expand Up @@ -289,17 +290,17 @@ Tree SteinerTreeBuilder::flute(const std::vector<int>& x,

int SteinerTreeBuilder::wirelength(Tree t)
{
return flute_->wirelength(t);
return flute_->wirelength(std::move(t));
}

void SteinerTreeBuilder::plottree(Tree t)
{
flute_->plottree(t);
flute_->plottree(std::move(t));
}

void SteinerTreeBuilder::write_svg(Tree t, const char* filename)
{
flute_->write_svg(t, filename);
flute_->write_svg(std::move(t), filename);
}

Tree SteinerTreeBuilder::flutes(const std::vector<int>& xs,
Expand Down

0 comments on commit f1f1ffa

Please sign in to comment.