summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/src/integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/taocrypt/src/integer.cpp')
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp
index b6a1b72a41f..67f3c963cac 100644
--- a/extra/yassl/taocrypt/src/integer.cpp
+++ b/extra/yassl/taocrypt/src/integer.cpp
@@ -32,7 +32,6 @@
# pragma warning(disable: 4250 4660 4661 4786 4355)
#endif
-#include "runtime.hpp"
#include "integer.hpp"
#include "modarith.hpp"
#include "asn.hpp"
@@ -108,7 +107,7 @@ CPP_TYPENAME AllocatorBase<T>::pointer AlignedAllocator<T>::allocate(
assert(IsAlignedOn(p, 16));
return (T*)p;
}
- return new T[n];
+ return new (tc) T[n];
}
@@ -129,7 +128,7 @@ void AlignedAllocator<T>::deallocate(void* p, size_type n)
#endif
}
else
- delete [] (T *)p;
+ tcArrayDelete((T *)p);
}
#endif // SSE2
@@ -2691,25 +2690,19 @@ unsigned int Integer::Encode(byte* output, unsigned int outputLen,
}
-const Integer Integer::zero(1,2);
+const Integer Integer::zero_;
const Integer &Integer::Zero()
{
- return zero;
+ return zero_;
}
-const Integer Integer::one(1,2);
-const Integer &Integer::One()
-{
- return one;
-}
+const Integer Integer::one_(1,2);
-const Integer Integer::two(1,2);
-
-const Integer &Integer::Two()
+const Integer &Integer::One()
{
- return two;
+ return one_;
}
@@ -3948,9 +3941,6 @@ Integer CRT(const Integer &xp, const Integer &p, const Integer &xq,
#ifdef __GNUC__
template unsigned int DivideThreeWordsByTwo<unsigned int, DWord>(unsigned int*, unsigned int, unsigned int, DWord*);
-#if defined(SSE2_INTRINSICS_AVAILABLE)
-template AlignedAllocator<unsigned int>::pointer StdReallocate<unsigned int, AlignedAllocator<unsigned int> >(AlignedAllocator<unsigned int>&, unsigned int*, AlignedAllocator<unsigned int>::size_type, AlignedAllocator<unsigned int>::size_type, bool);
-#endif
#endif
} // namespace