fix VC 6 compile
parent
f018ac354a
commit
42d92648b6
|
|
@ -71,11 +71,9 @@ typename A::pointer StandardReallocate(A& a, T *p, typename A::size_type oldSize
|
||||||
|
|
||||||
if (preserve)
|
if (preserve)
|
||||||
{
|
{
|
||||||
A b;
|
typename A::pointer newPointer = a.allocate(newSize, NULL);
|
||||||
typename A::pointer newPointer = b.allocate(newSize, NULL);
|
|
||||||
memcpy_s(newPointer, sizeof(T)*newSize, p, sizeof(T)*STDMIN(oldSize, newSize));
|
memcpy_s(newPointer, sizeof(T)*newSize, p, sizeof(T)*STDMIN(oldSize, newSize));
|
||||||
a.deallocate(p, oldSize);
|
a.deallocate(p, oldSize);
|
||||||
std::swap(a, b);
|
|
||||||
return newPointer;
|
return newPointer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ typedef BlockGetAndPut<word16, LittleEndian> Block;
|
||||||
*/
|
*/
|
||||||
void SKIPJACK::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
void SKIPJACK::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||||
{
|
{
|
||||||
word w1, w2, w3, w4;
|
word16 w1, w2, w3, w4;
|
||||||
Block::Get(inBlock)(w4)(w3)(w2)(w1);
|
Block::Get(inBlock)(w4)(w3)(w2)(w1);
|
||||||
|
|
||||||
/* stepping rule A: */
|
/* stepping rule A: */
|
||||||
|
|
@ -151,7 +151,7 @@ void SKIPJACK::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||||
*/
|
*/
|
||||||
void SKIPJACK::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
void SKIPJACK::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
|
||||||
{
|
{
|
||||||
word w1, w2, w3, w4;
|
word16 w1, w2, w3, w4;
|
||||||
Block::Get(inBlock)(w4)(w3)(w2)(w1);
|
Block::Get(inBlock)(w4)(w3)(w2)(w1);
|
||||||
|
|
||||||
/* stepping rule A: */
|
/* stepping rule A: */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue