Skip to content

Commit 95cae7a

Browse files
committed
fix: extra copy in CandidateObject
1 parent b1c92af commit 95cae7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ std::optional<Napi::Array> getChildren(const Napi::Object &jsTree, const string
2727

2828

2929
struct CandidateObject {
30-
const CandidateString data;// TODO copy
30+
const CandidateString data;
3131
const size_t level = 0;
3232
const size_t index = 0;
3333

34-
CandidateObject(const CandidateString data_, const size_t level_, const size_t index_) noexcept
35-
: data{ data_ }, level{ level_ }, index{ index_ } {};
34+
CandidateObject(const CandidateString &data_, const size_t level_, const size_t index_) noexcept
35+
: data{ data_ }, level{ level_ }, index{ index_ } {}
3636
};
3737

3838
template<typename T>

0 commit comments

Comments
 (0)