diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-09 15:13:47 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-03-09 15:13:47 +0100 |
commit | 8db07b95476a40304b49e4d033ccbec76501fed4 (patch) | |
tree | f887943ad6439da85abfb07daf05407b90934bfe | |
parent | cd16b241c028b0c2ecc4578aa84d31bea5128dc9 (diff) | |
download | ATCD-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.cpp | 4 |
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; |