remove tools::add_element

This commit is contained in:
akildemir
2025-08-08 14:54:55 +03:00
parent 52f2065db4
commit a159bed3ba
7 changed files with 59 additions and 69 deletions

View File

@@ -157,7 +157,7 @@ TEST(x25519, scmul_key_convergence)
for (unsigned char j = 0; j < 8; ++j)
{
// add 2^i + j (sometimes with duplicates, which is okay)
mx25519_privkey &s = tools::add_element(scalars);
mx25519_privkey &s = scalars.emplace_back();
memset(s.data, 0, sizeof(mx25519_privkey));
const int msb_byte_index = i >> 3;
const int msb_bit_index = i & 7;
@@ -169,7 +169,7 @@ TEST(x25519, scmul_key_convergence)
scalars.push_back(hex2pod<mx25519_privkey>("ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f"));
// add random
const rct::key a = rct::skGen();
memcpy(tools::add_element(scalars).data, &a, sizeof(mx25519_privkey));
memcpy(scalars.emplace_back().data, &a, sizeof(mx25519_privkey));
std::vector<std::pair<rct::key, mx25519_pubkey>> points;
// add base point