summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 15:13:47 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-03-09 15:13:47 +0100
commit8db07b95476a40304b49e4d033ccbec76501fed4 (patch)
treef887943ad6439da85abfb07daf05407b90934bfe
parentcd16b241c028b0c2ecc4578aa84d31bea5128dc9 (diff)
downloadATCD-8db07b95476a40304b49e4d033ccbec76501fed4.tar.gz
Use SIZE_MAX, numeric_limits is a constexpr which the compiler checks
* ACE/tests/New_Fail_Test.cpp:
-rw-r--r--ACE/tests/New_Fail_Test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ACE/tests/New_Fail_Test.cpp b/ACE/tests/New_Fail_Test.cpp
index a17e77dd012..4d1350fe712 100644
--- a/ACE/tests/New_Fail_Test.cpp
+++ b/ACE/tests/New_Fail_Test.cpp
@@ -20,7 +20,7 @@
#include "ace/Log_Msg.h"
#include "ace/OS_Memory.h"
#include "ace/CORBA_macros.h"
-#include "ace/Numeric_Limits.h"
+#include <stdint.h>
// This test allocates all of the heap memory, forcing 'new' to fail
// because of a lack of memory. The ACE_NEW macros should prevent an
@@ -32,7 +32,7 @@
// somewhere else in the test.
// Most we can do, by a quarter
-static const size_t BIG_BLOCK = ACE_Numeric_Limits<size_t>::max () / 4;
+static const size_t BIG_BLOCK = SIZE_MAX / 4;
// Shouldn't take many "as much as possible" tries to get a failure.
static constexpr int MAX_ALLOCS_IN_TEST = 20;