mirror of
https://github.com/SWG-Source/src.git
synced 2026-10-09 01:12:56 -04:00
use unique_ptr instead of auto_ptr - note that this modifies boost, which isn't a big deal since it is part of the repo, but we should really decouple the open source libs sometime
This commit is contained in:
@@ -471,14 +471,14 @@ unsigned int PK_FixedLengthDecryptor::Decrypt(const byte *cipherText, unsigned i
|
||||
|
||||
void PK_Signer::SignMessage(RandomNumberGenerator &rng, const byte *message, unsigned int messageLen, byte *signature) const
|
||||
{
|
||||
std::auto_ptr<HashModule> accumulator(NewMessageAccumulator());
|
||||
std::unique_ptr<HashModule> accumulator(NewMessageAccumulator());
|
||||
accumulator->Update(message, messageLen);
|
||||
Sign(rng, accumulator.release(), signature);
|
||||
}
|
||||
|
||||
bool PK_Verifier::VerifyMessage(const byte *message, unsigned int messageLen, const byte *sig) const
|
||||
{
|
||||
std::auto_ptr<HashModule> accumulator(NewMessageAccumulator());
|
||||
std::unique_ptr<HashModule> accumulator(NewMessageAccumulator());
|
||||
accumulator->Update(message, messageLen);
|
||||
return Verify(accumulator.release(), sig);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void ProxyFilter::SetFilter(Filter *filter)
|
||||
m_filter.reset(filter);
|
||||
if (filter)
|
||||
{
|
||||
std::auto_ptr<OutputProxy> temp(m_proxy = new OutputProxy(*this, passSignal));
|
||||
std::unique_ptr<OutputProxy> temp(m_proxy = new OutputProxy(*this, passSignal));
|
||||
m_filter->TransferAllTo(*m_proxy);
|
||||
m_filter->Attach(temp.release());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user