@@ -35,10 +35,10 @@ class BVFixed
3535 static BVFixed * New (TAllocator* alloc, BVFixed * initBv);
3636
3737 template <typename TAllocator>
38- static BVFixed * New (BVIndex length, TAllocator* alloc, bool initialSet = false );
38+ static BVFixed * New (__declspec(guard(overflow)) BVIndex length, TAllocator* alloc, bool initialSet = false);
3939
4040 template <typename TAllocator>
41- static BVFixed * NewNoThrow (BVIndex length, TAllocator* alloc, bool initialSet = false );
41+ static BVFixed * NewNoThrow (__declspec(guard(overflow)) BVIndex length, TAllocator* alloc, bool initialSet = false);
4242
4343 template <typename TAllocator>
4444 void Delete (TAllocator * alloc);
@@ -152,14 +152,14 @@ BVFixed * BVFixed::New(TAllocator * alloc, BVFixed * initBv)
152152}
153153
154154template <typename TAllocator>
155- BVFixed * BVFixed::New (BVIndex length, TAllocator * alloc, bool initialSet)
155+ BVFixed * BVFixed::New (__declspec ( guard (overflow)) BVIndex length, TAllocator * alloc, bool initialSet)
156156{
157157 BVFixed *result = AllocatorNewPlus (TAllocator, alloc, sizeof (BVUnit) * BVFixed::WordCount (length), BVFixed, length, initialSet);
158158 return result;
159159}
160160
161161template <typename TAllocator>
162- BVFixed * BVFixed::NewNoThrow (BVIndex length, TAllocator * alloc, bool initialSet)
162+ BVFixed * BVFixed::NewNoThrow (__declspec ( guard (overflow)) BVIndex length, TAllocator * alloc, bool initialSet)
163163{
164164 BVFixed *result = AllocatorNewNoThrowPlus (TAllocator, alloc, sizeof (BVUnit) * BVFixed::WordCount (length), BVFixed, length, initialSet);
165165 return result;
0 commit comments