Skip to content

Commit 79981b5

Browse files
committed
fix: don't call constructor and emplace_back together
1 parent 487cf1b commit 79981b5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/tree.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,11 @@ struct Tree {
5353

5454
/** 1st argument is a single object */
5555
void makeEntriesArray(const Napi::Object &jsTree, const size_t level, const size_t iEntry) {
56-
// finally emplace it back
56+
// make the CandidateObject and push it back
5757
entriesArray.emplace_back(
58-
// then make the CandidateObject
59-
CandidateObject(
60-
jsTree.Get(dataKey).ToString().Utf8Value(),// first, get the current data
61-
level,
62-
iEntry)
58+
jsTree.Get(dataKey).ToString().Utf8Value(),// first, get the current data
59+
level,
60+
iEntry
6361

6462
);
6563

0 commit comments

Comments
 (0)