Skip to content

Commit

Permalink
elements: Directly return the resulting vector
Browse files Browse the repository at this point in the history
  • Loading branch information
xdustinface authored and mariano54 committed Mar 3, 2021
1 parent 43e81bd commit 71fef16
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ std::vector<uint8_t> G1Element::Serialize() const {
}

buffer[1] |= 0x80; // indicate compression
std::vector<uint8_t> result(buffer + 1, buffer + 1 + G1Element::SIZE);
return result;
return std::vector<uint8_t>(buffer + 1, buffer + 1 + G1Element::SIZE);
}

bool operator==(const G1Element & a, const G1Element &b)
Expand Down

0 comments on commit 71fef16

Please sign in to comment.