diff --git a/include/etl/random.h b/include/etl/random.h index cffeb4cc..459f22f2 100644 --- a/include/etl/random.h +++ b/include/etl/random.h @@ -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. diff --git a/include/etl/version.h b/include/etl/version.h index 36722ccd..bde5c74c 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -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)) diff --git a/support/Release notes.txt b/support/Release notes.txt index f020d732..997084eb 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -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. diff --git a/test/etl_profile.h b/test/etl_profile.h index 4fd138ab..578de812 100644 --- a/test/etl_profile.h +++ b/test/etl_profile.h @@ -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