mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Merge remote-tracking branch 'origin/feature/optional_virtual_for_random' into development
This commit is contained in:
commit
34327f0a45
@ -38,6 +38,7 @@ SOFTWARE.
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if defined(ETL_POLYMORPHIC_RANDOM)
|
||||
//***************************************************************************
|
||||
/// The base for all 32 bit random number generators.
|
||||
//***************************************************************************
|
||||
@ -53,6 +54,23 @@ namespace etl
|
||||
virtual uint32_t operator()() = 0;
|
||||
virtual uint32_t range(uint32_t low, uint32_t high) = 0;
|
||||
};
|
||||
#else
|
||||
//***************************************************************************
|
||||
/// The base for all 32 bit random number generators.
|
||||
/// Empty, non-virtual.
|
||||
//***************************************************************************
|
||||
class random
|
||||
{
|
||||
protected:
|
||||
random()
|
||||
{
|
||||
}
|
||||
|
||||
~random()
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// A 32 bit random number generator.
|
||||
|
||||
@ -38,8 +38,8 @@ SOFTWARE.
|
||||
///\ingroup utilities
|
||||
|
||||
#define ETL_VERSION_MAJOR 14
|
||||
#define ETL_VERSION_MINOR 26
|
||||
#define ETL_VERSION_PATCH 8
|
||||
#define ETL_VERSION_MINOR 27
|
||||
#define ETL_VERSION_PATCH 0
|
||||
|
||||
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH)
|
||||
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH))
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
===============================================================================
|
||||
14.27.0
|
||||
ETL's random number generators are now non-polymorphic by default.
|
||||
Define ETL_POLYMORPHIC_RANDOM to enable previous functionality.
|
||||
|
||||
===============================================================================
|
||||
14.26.8
|
||||
Moved global operators to ETL namespace.
|
||||
|
||||
@ -43,6 +43,8 @@ SOFTWARE.
|
||||
#define ETL_MESSAGE_TIMER_USE_ATOMIC_LOCK
|
||||
#define ETL_CALLBACK_TIMER_USE_ATOMIC_LOCK
|
||||
|
||||
#define ETL_POLYMORPHIC_RANDOM
|
||||
|
||||
#define ETL_POLYMORPHIC_BITSET
|
||||
#define ETL_POLYMORPHIC_DEQUE
|
||||
#define ETL_POLYMORPHIC_FLAT_MAP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user