summaryrefslogtreecommitdiff
path: root/secblock.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-05 19:03:05 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-05 19:03:05 +0000
commita014d8f7eb4718e182844557bdd6a13f6e28529a (patch)
tree370c4cbbbd7544e6354958591e309b7952c64cea /secblock.h
parent7ae0bd42ae6dc01e6516d7be946faa8b9947c923 (diff)
downloadcryptopp-a014d8f7eb4718e182844557bdd6a13f6e28529a.tar.gz
fix VC 6 compile
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@366 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'secblock.h')
-rw-r--r--secblock.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/secblock.h b/secblock.h
index 6ba0656..4e082b8 100644
--- a/secblock.h
+++ b/secblock.h
@@ -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