fix VC 6 compile

pull/2/head
weidai 2007-05-05 19:03:05 +00:00
parent f018ac354a
commit 42d92648b6
2 changed files with 3 additions and 5 deletions

View File

@ -71,11 +71,9 @@ typename A::pointer StandardReallocate(A& a, T *p, typename A::size_type oldSize
if (preserve)
{
A b;
typename A::pointer newPointer = b.allocate(newSize, NULL);
typename A::pointer newPointer = a.allocate(newSize, NULL);
memcpy_s(newPointer, sizeof(T)*newSize, p, sizeof(T)*STDMIN(oldSize, newSize));
a.deallocate(p, oldSize);
std::swap(a, b);
return newPointer;
}
else

View File

@ -100,7 +100,7 @@ typedef BlockGetAndPut<word16, LittleEndian> Block;
*/
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);
/* 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
{
word w1, w2, w3, w4;
word16 w1, w2, w3, w4;
Block::Get(inBlock)(w4)(w3)(w2)(w1);
/* stepping rule A: */