This commit is contained in:
MMS 2021-09-03 11:54:02 -04:00
parent aa4a9d6c9b
commit fe5d6ba65e
2 changed files with 11 additions and 7 deletions

View File

@ -2,14 +2,14 @@
/// @brief QF/C++ memory management services
/// @cond
///***************************************************************************
/// Last updated for version 6.9.1
/// Last updated on 2020-09-17
/// Last updated for version 6.9.4
/// Last updated on 2021-09-03
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
@ -107,7 +107,7 @@ void QMPool::init(void * const poolSto, std::uint_fast32_t poolSize,
/// the poolSize must fit at least one free block and
/// the blockSize must not be too close to the top of the dynamic range
Q_REQUIRE_ID(100, (poolSto != nullptr)
&& (poolSize >= sizeof(QFreeBlock))
&& (poolSize >= static_cast<std::uint_fast32_t>(sizeof(QFreeBlock)))
&& (static_cast<std::uint_fast16_t>(blockSize + sizeof(QFreeBlock))
> blockSize));

View File

@ -3,14 +3,14 @@
/// @ingroup qf
/// @cond
///***************************************************************************
/// Last updated for version 6.9.1
/// Last updated on 2020-09-17
/// Last updated for version 6.9.4
/// Last updated on 2021-09-03
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved.
///
/// This program is open source software: you can redistribute it and/or
/// modify it under the terms of the GNU General Public License as published
@ -205,6 +205,10 @@ void QF::tickX_(std::uint_fast8_t const tickRate) noexcept
///
bool QF::noTimeEvtsActiveX(std::uint_fast8_t const tickRate) noexcept {
bool inactive;
/// @pre the tick rate must be in range
Q_REQUIRE_ID(200, tickRate < QF_MAX_TICK_RATE);
if (timeEvtHead_[tickRate].m_next != nullptr) {
inactive = false;
}