Skip to content

Commit 05a8e77

Browse files
committed
warning cleanup and BitVector const append
1 parent f0ee30e commit 05a8e77

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

cryptoTools/Circuit/MxCircuit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,12 @@ namespace osuCrypto
277277
{
278278
if (b.mAddress.hasValue() == false)
279279
throw std::runtime_error("error: reading an uninitilized value. " LOCATION);
280+
#ifndef NDEBUG
280281
auto addr = b.mAddress.gate();
281282
auto off = b.mAddress.offset();
282283
assert(addr < mGates.size() &&
283284
off < mGates[addr].mNumOutputs);
285+
#endif // !NDEBUG
284286

285287
return b.mAddress;
286288
}

cryptoTools/Common/BitVector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace osuCrypto {
3434
std::copy_n(K.mData.get(), sizeBlocks(), mData.get());
3535
}
3636

37-
void BitVector::append(u8* dataIn, u64 length, u64 offset)
37+
void BitVector::append(const u8* dataIn, u64 length, u64 offset)
3838
{
3939

4040
auto bitIdx = mNumBits;

cryptoTools/Common/BitVector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace osuCrypto {
4040
void assign(const BitVector& K);
4141

4242
// Append length bits pointed to by data starting a the bit index by offset.
43-
void append(u8* data, u64 length, u64 offset = 0);
43+
void append(const u8* data, u64 length, u64 offset = 0);
4444

4545
// Append an existing BitVector to this BitVector.
4646
void append(const BitVector& k) { append(k.data(), k.size()); }

0 commit comments

Comments
 (0)