mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
Update programming by contract macros
This commit is contained in:
@@ -58,15 +58,6 @@
|
|||||||
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
|
||||||
Set this to 1 to prevent check_contract macros from evaluating their
|
|
||||||
conditions, which might be expensive. meet_contract macros will still
|
|
||||||
evaluate their conditions since their return values are checked.
|
|
||||||
*/
|
|
||||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
|
||||||
//#define BEAST_DISABLE_CONTRACT_CHECKS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||||
Setting this option makes Socket-derived classes generate compile errors
|
Setting this option makes Socket-derived classes generate compile errors
|
||||||
if they forget any of the virtual overrides As some Socket-derived classes
|
if they forget any of the virtual overrides As some Socket-derived classes
|
||||||
|
|||||||
@@ -71,15 +71,6 @@
|
|||||||
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
|
||||||
Set this to 1 to prevent check_contract macros from evaluating their
|
|
||||||
conditions, which might be expensive. meet_contract macros will still
|
|
||||||
evaluate their conditions since their return values are checked.
|
|
||||||
*/
|
|
||||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
|
||||||
//#define BEAST_DISABLE_CONTRACT_CHECKS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||||
Setting this option makes Socket-derived classes generate compile errors
|
Setting this option makes Socket-derived classes generate compile errors
|
||||||
if they forget any of the virtual overrides As some Socket-derived classes
|
if they forget any of the virtual overrides As some Socket-derived classes
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public:
|
|||||||
// We don't really expect the program to run after this
|
// We don't really expect the program to run after this
|
||||||
// but the unit test is here so you can manually test it.
|
// but the unit test is here so you can manually test it.
|
||||||
int shouldBeZero (1);
|
int shouldBeZero (1);
|
||||||
fatal_assert (shouldBeZero == 0);
|
check_invariant (shouldBeZero == 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user