diff --git a/docs/IO/buffer_descriptors.md b/docs/IO/buffer_descriptors.md
index 4e49278e..df7f77b6 100644
--- a/docs/IO/buffer_descriptors.md
+++ b/docs/IO/buffer_descriptors.md
@@ -188,7 +188,7 @@ A nested class that is sent to the user defined callback function.
notification()
```
**Description**
-Default contructor.
+Default constructor.
Initialises to a default constructed descriptor and a count of zero.
---
diff --git a/docs/_index.md b/docs/_index.md
index 4fbb737c..a1886a77 100644
--- a/docs/_index.md
+++ b/docs/_index.md
@@ -39,7 +39,7 @@ type: hextra-home
diff --git a/docs/blog/graphics/determining-line-line-intersections.md b/docs/blog/graphics/determining-line-line-intersections.md
index 279103ae..bcc6b12f 100644
--- a/docs/blog/graphics/determining-line-line-intersections.md
+++ b/docs/blog/graphics/determining-line-line-intersections.md
@@ -87,7 +87,7 @@ This means you can find intersection points relative to a fixed reference line.

-## Refection
+## Reflection
This describes reflecting a point across a reference line.
It uses the intersection method described above.
diff --git a/docs/callbacks/function.md b/docs/callbacks/function.md
index 7785b0f1..42f83b4e 100644
--- a/docs/callbacks/function.md
+++ b/docs/callbacks/function.md
@@ -18,7 +18,7 @@ This may be used to implement a platform abstraction layer that allows an embedd
| Template | Description |
| ----------------- | ------------------------------------------------------------------------- |
| etl::function | Callbacks to free or member functions taking zero or one parameter.
Function pointer at runtime. |
-| etl::function_fv | Callback to a free function taking no parameters. (Functiion Void).
Function pointer at compile time. |
+| etl::function_fv | Callback to a free function taking no parameters. (Function Void).
Function pointer at compile time. |
| etl::function_fp | Callback to a free function taking one parameter. (Function Parameter).
Function pointer at compile time.
| etl::function_mv | Callback to a member function taking no parameters. (Member Void).
Function pointer at compile time. |
| etl::function_imv | Callback to a member function taking no parameters. (Instance Member Void ).
Instance reference and function pointer at compile time. |
diff --git a/docs/callbacks/signal.md b/docs/callbacks/signal.md
index a8c19efc..53d05534 100644
--- a/docs/callbacks/signal.md
+++ b/docs/callbacks/signal.md
@@ -15,7 +15,7 @@ template `
## Types
diff --git a/docs/chrono/duration/duration.md b/docs/chrono/duration/duration.md
index c75c6a7b..7900e8b3 100644
--- a/docs/chrono/duration/duration.md
+++ b/docs/chrono/duration/duration.md
@@ -112,7 +112,7 @@ ETL_CONSTEXPR14
etl::chrono::duration operator =(const etl::chrono::duration& other) ETL_NOEXCEPT
```
-### Convertion
+### Conversion
```cpp
ETL_CONSTEXPR14
TRep count() const
diff --git a/docs/chrono/month/month_weekday.md b/docs/chrono/month/month_weekday.md
index ab73505e..3d7037c6 100644
--- a/docs/chrono/month/month_weekday.md
+++ b/docs/chrono/month/month_weekday.md
@@ -20,7 +20,7 @@ class month_weekday
ETL_CONSTEXPR
month_weekday()
```
-**Decription**
+**Description**
Default constructor.
---
@@ -31,7 +31,7 @@ month_weekday(const etl::chrono::month& m,
const etl::chrono::weekday_indexed& wd)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Construct from month and weekday_indexed.
## Access
@@ -75,7 +75,7 @@ bool operator ==(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Equality operator.
---
@@ -86,7 +86,7 @@ bool operator !=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Inequality operator.
---
@@ -97,7 +97,7 @@ bool operator <(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Less-than operator.
---
@@ -108,7 +108,7 @@ bool operator <=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Less-than-equal operator.
---
@@ -119,7 +119,7 @@ bool operator <(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Greater-than operator.
---
@@ -130,7 +130,7 @@ bool operator <=(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Greater-than-equal operator.
---
@@ -141,7 +141,7 @@ auto operator <=>(const etl::chrono::month_weekday& lhs,
const etl::chrono::month_weekday& rhs)
ETL_NOEXCEPT
```
-**Decription**
+**Description**
Spaceship operator.
C++20
@@ -151,6 +151,6 @@ C++20
template
struct hash
```
-**Decription**
+**Description**
Hash function for `etl::chrono::month_weekday`.
diff --git a/docs/chrono/year/year_month_day_last.md b/docs/chrono/year/year_month_day_last.md
index 426a51ab..dc19db52 100644
--- a/docs/chrono/year/year_month_day_last.md
+++ b/docs/chrono/year/year_month_day_last.md
@@ -56,7 +56,7 @@ The year.
---
-```coo
+```cpp
ETL_NODISCARD
ETL_CONSTEXPR14
etl::chrono::month month() const
diff --git a/docs/containers/Views/span.md b/docs/containers/Views/span.md
index 8fb131f7..9e619b4e 100644
--- a/docs/containers/Views/span.md
+++ b/docs/containers/Views/span.md
@@ -356,7 +356,7 @@ bool equal(const etl::span& lhs, const etl::span& rhs)
```
**Description**
Equality function.
-Performs a comparision of the range values.
+Performs a comparison of the range values.
Returns `true` if one of the following are `true`
1. Both spans are empty.
2. They both point to the same range of data.
diff --git a/docs/containers/pools/generic-pool.md b/docs/containers/pools/generic-pool.md
index eb400d36..d4dba97b 100644
--- a/docs/containers/pools/generic-pool.md
+++ b/docs/containers/pools/generic-pool.md
@@ -72,7 +72,7 @@ generic_pool_ext(char* buffer, size_t size)
```
**Description**
For `etl::generic_pool_ext`.
-Constructs a generic_pool from an external bufffer.
+Constructs a generic_pool from an external buffer.
No elements are constructed.
## Operations
diff --git a/docs/containers/pools/pool.md b/docs/containers/pools/pool.md
index 4b1e6fbf..4f6b1c6e 100644
--- a/docs/containers/pools/pool.md
+++ b/docs/containers/pools/pool.md
@@ -94,7 +94,7 @@ pool_ext(char* buffer, size_t size)
```
**Description**
For `etl::pool_ext`.
-Constructs a pool from an external bufffer.
+Constructs a pool from an external buffer.
No elements are constructed.
## Operations
diff --git a/docs/containers/sets/const-multiset.md b/docs/containers/sets/const-multiset.md
index 8d8fc79a..f4200dad 100644
--- a/docs/containers/sets/const-multiset.md
+++ b/docs/containers/sets/const-multiset.md
@@ -17,7 +17,7 @@ Uses `etl::less` as the default key comparison method.
etl::const_multiset
```
-**Enternal storage**
+**Internal storage**
```cpp
etl::const_multiset_ext
```
diff --git a/docs/containers/sets/const-set.md b/docs/containers/sets/const-set.md
index 706eef0e..100549f7 100644
--- a/docs/containers/sets/const-set.md
+++ b/docs/containers/sets/const-set.md
@@ -17,7 +17,7 @@ Uses `etl::less` as the default key comparison method.
etl::const_set
```
-**Enternal storage**
+**Internal storage**
```cpp
etl::const_set_ext
```
diff --git a/docs/containers/variadics/_index.md b/docs/containers/variadics/_index.md
index 7c051c71..3789c5e4 100644
--- a/docs/containers/variadics/_index.md
+++ b/docs/containers/variadics/_index.md
@@ -3,4 +3,4 @@ title: "Variadics"
weight: 100
---
-Containers tha accept multiple types.
\ No newline at end of file
+Containers that accept multiple types.
\ No newline at end of file
diff --git a/docs/containers/variadics/packet.md b/docs/containers/variadics/packet.md
index 4533be50..9a420646 100644
--- a/docs/containers/variadics/packet.md
+++ b/docs/containers/variadics/packet.md
@@ -22,7 +22,7 @@ etl::packet
`base_t` = `TBase`
-## Contructors
+## Constructors
**C++03**
```cpp
diff --git a/docs/getting-started/contribute.md b/docs/getting-started/contribute.md
index 003fbef7..4d75959f 100644
--- a/docs/getting-started/contribute.md
+++ b/docs/getting-started/contribute.md
@@ -30,7 +30,7 @@ Lower case class and function names, separated by an underscore.
`funky_container`
`do_something`
-### Nameing convension
+### Naming convention
Use the same naming convention as the STL.
If appropriate for the class, a set of `typedef`s should often be present to define types such as...
@@ -159,7 +159,7 @@ class my_new_class
```
### Layout
-When possible, try to tabluate the initialisation of multiple variables. It's a lot easier to read.
+When possible, try to tabulate the initialisation of multiple variables. It's a lot easier to read.
Don't be too strict about it, if it would result in giant amounts of whitespace.
```cpp
@@ -240,4 +240,4 @@ When opening a new pull request, ensure that you include the following informati
- Branches should be based on the branch `master`.
`development` can change quite frequently, so I will rebase the your PR against it before merging.
- For formatting help, you can use `clang-format`, or the convenience wrapper `treefmt`. See also [Source formatting]({{% relref "source-formatting.md" %}}).
-- Update the relevent documentation markdown file, found in `etl/docs`.
\ No newline at end of file
+- Update the relevant documentation markdown file, found in `etl/docs`.
\ No newline at end of file
diff --git a/docs/getting-started/macros.md b/docs/getting-started/macros.md
index 3444a3a9..23a6f37d 100644
--- a/docs/getting-started/macros.md
+++ b/docs/getting-started/macros.md
@@ -83,19 +83,19 @@ These may be defined in the project settings or the user created `etl_profile.h`
| `ETL_NODISCARD` | If `ETL_CPP11_SUPPORTED` is defined as `1` then this macro is defined as `[[nodiscard]]`, otherwise defined as blank.|
| `ETL_DEPRECATED` | If `ETL_CPP14_SUPPORTED` is defined as `1` then this macro is defined as `[[deprecated]]`, otherwise defined as blank.|
| `ETL_DEPRECATED_REASON(reason)` | If `ETL_CPP14_SUPPORTED` is defined as `1` then this macro is defined as `[[deprecated(reason)]]`, otherwise defined as blank.|
-| `ETL_FALLTHROUGH` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `[[falltrough]]`, otherwise defined as blank.|
+| `ETL_FALLTHROUGH` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `[[fallthrough]]`, otherwise defined as blank.|
| `ETL_NORETURN` | If `ETL_CPP11_SUPPORTED` is defined as `1` then this macro is defined as `[[noreturn]]`, otherwise defined as blank.|
| `ETL_OR_STD` | If ETL_NO_STL is defined and ETL_IN_UNIT_TEST is not then `ETL_OR_STD` is defined as `etl`, otherwise it is defined as `std`.|
| `ETL_IN_UNIT_TEST` | If defined, then the code is being compiled in the unit tests.
For internal ETL use only.|
| `ETL_HAS_ATOMIC` | This is defined as `1` if the compiler supplies an atomic class, otherwise `0`.|
| `ETL_INLINE_VAR` | If `ETL_CPP17_SUPPORTED` is defined as `1` then this macro is defined as `inline`, otherwise defined as blank.|
-| `ETL_USING_STL` | This macro will be defined as `0` & `1` dependant of whether `ETL_NO_STL` is defined or not.|
+| `ETL_USING_STL` | This macro will be defined as `0` & `1` depending on whether `ETL_NO_STL` is defined or not.|
| `ETL_NOT_USING_STL` | Inversion of `ETL_USING_STL`.|
-| `ETL_USING_STLPORT` | This macro will be defined as `0` & `1` dependant of whether `ETL_STLPORT` is defined or not.|
+| `ETL_USING_STLPORT` | This macro will be defined as `0` & `1` depending on whether `ETL_STLPORT` is defined or not.|
| `ETL_NOT_USING_STLPORT` | Inversion of `ETL_USING_STLPORT`.|
-| `ETL_USING_8BIT_TYPES` | This macro will be defined as `0` & `1` dependant of whether `CHAR_BIT == 8` or not.|
+| `ETL_USING_8BIT_TYPES` | This macro will be defined as `0` & `1` depending on whether `CHAR_BIT == 8` or not.|
| `ETL_NOT_USING_8BIT_TYPES` | Inversion of `ETL_USING_8BIT_TYPES`.|
-| `ETL_USING_64BIT_TYPES` | This macro will be defined as `0` & `1` dependant of whether `ETL_NO_64BIT_TYPES` is defined or not.|
+| `ETL_USING_64BIT_TYPES` | This macro will be defined as `0` & `1` depending on whether `ETL_NO_64BIT_TYPES` is defined or not.|
| `ETL_NOT_USING_64BIT_TYPES` | Inversion of `ETL_USING_64BIT_TYPES`.|
| `ETL_HAS_ISTRING_REPAIR` | Set to `1` if the repair functionality for `etl::istring` is enabled, otherwise `0`.|
| `ETL_HAS_IVECTOR_REPAIR` | Set to `1` if the repair functionality for `etl::ivector` is enabled, otherwise `0`.|
@@ -103,7 +103,7 @@ These may be defined in the project settings or the user created `etl_profile.h`
| `ETL_IS_DEBUG_BUILD` | Set to `1` if in a debug build, otherwise `0`.|
| `ETL_HAS_POLYMORPHIC_MESSAGES` | Set to `1` if messages are polymorphic, otherwise `0`.|
| `ETL_HAS_ERROR_ON_STRING_TRUNCATION` | Set to `1` if truncated strings are an error, otherwise `0`.|
-| `ETL_USING_LIBC_WCHAR_H` | These macros will be defined as `0` & `1` dependant of whether `ETL_NO_LIBC_WCHAR_H` is defined or not.|
+| `ETL_USING_LIBC_WCHAR_H` | These macros will be defined as `0` & `1` depending on whether `ETL_NO_LIBC_WCHAR_H` is defined or not.|
| `ETL_NOT_USING_LIBC_WCHAR_H` | Inversion of `ETL_USING_LIBC_WCHAR_H`.|
| `ETL_USING_CPP11` | This is defined as `1` if the compiler supports C++11, otherwise `0`.|
| `ETL_USING_CPP14` | This is defined as `1` if the compiler supports C++14, otherwise `0`.|
diff --git a/docs/iterators/fixed_iterator.md b/docs/iterators/fixed_iterator.md
index 207a16d5..033081cc 100644
--- a/docs/iterators/fixed_iterator.md
+++ b/docs/iterators/fixed_iterator.md
@@ -30,13 +30,13 @@ etl::fixed_iterator(const etl::fixed_iterator&);
```cpp
Titerator get() const;
```
-**Decscription**
+**Description**
Get the internal iterator.
```cpp
void get(TIterator it);
```
-**Decscription**
+**Description**
Set the iterator.
## Operators
@@ -44,7 +44,7 @@ Set the iterator.
typename etl::iterator_traits::value_type operator *()
const typename etl::iterator_traits::value_type operator *() const
```
-**Decscription**
+**Description**
Dereference operators
---
@@ -53,7 +53,7 @@ Dereference operators
TIterator operator ->()
const TIterator operator ->() const
```
-**Decscription**
+**Description**
Member dereference operators
---
@@ -61,7 +61,7 @@ Member dereference operators
```cpp
operator TIterator() const
```
-**Decscription**
+**Description**
Conversion operator
## Example
diff --git a/docs/messaging/message-bus.md b/docs/messaging/message-bus.md
index 921e5b86..7277c01d 100644
--- a/docs/messaging/message-bus.md
+++ b/docs/messaging/message-bus.md
@@ -177,7 +177,7 @@ bus2.subscribe(routerD);
bus2.subscribe(routerC);
// Subscribe routerE to bus3.
-bus3.subscibe(routerE);
+bus3.subscribe(routerE);
// Assume all routers accept the same messages.
diff --git a/docs/releases/_index.md b/docs/releases/_index.md
index 15553d90..aa737d96 100644
--- a/docs/releases/_index.md
+++ b/docs/releases/_index.md
@@ -73,7 +73,7 @@ Click on the links to see the original Github page.
[#1432](https://github.com/ETLCPP/etl/pull/1432) Simplify and fix test/run-syntax-checks.sh
[#1433](https://github.com/ETLCPP/etl/pull/1433) Fix the case of using STL without pthreads but with mutexes
[#1434](https://github.com/ETLCPP/etl/pull/1434) Remove unnecessary includes
-[#1437](https://github.com/ETLCPP/etl/pull/1437) ranges: Fix confict with Zephyr preprocessor definition
+[#1437](https://github.com/ETLCPP/etl/pull/1437) ranges: Fix conflict with Zephyr preprocessor definition
[#1440](https://github.com/ETLCPP/etl/pull/1440) Make etl::variant capable for ROM placement and optimize runtime size
[#1441](https://github.com/ETLCPP/etl/pull/1441) Make etl::variant capable for ROM placement and optimize runtime size
[#1442](https://github.com/ETLCPP/etl/pull/1442) Fix format: float zero-padding, nested replacement width, octal alter…
@@ -152,7 +152,7 @@ Click on the links to see the original Github page.
**Issues:**
[#1184](https://github.com/ETLCPP/etl/issues/1184) Request: Adding a method to check whether a etl::callback_timer_atomic is currently running
-[#1189](https://github.com/ETLCPP/etl/issues/1189) Request: make useage of osMutexRobust in etl::mutex optional
+[#1189](https://github.com/ETLCPP/etl/issues/1189) Request: make usage of osMutexRobust in etl::mutex optional
[#1207](https://github.com/ETLCPP/etl/issues/1207) Monadic Operations for etl::expected
[#1240](https://github.com/ETLCPP/etl/issues/1240) Add redundant semicolon checks to CMakeLists.txt and fix issues
[#1241](https://github.com/ETLCPP/etl/issues/1241) Add -pedantic-errors to unit test CMakeLists.txt and fix issues
@@ -335,7 +335,7 @@ Removed redundant ETL_USING_WIDE_CHARACTERS
Fixes:
#1126 to_arithmetic-does-not-compile-on-C++98
#1128 Request: Make Delegate Methods noexcept
-#1130 Use of etl::mem_copy for overlaped areas
+#1130 Use of etl::mem_copy for overlapped areas
#1132 Make type_def Methods Noexcept
#1143 v20.41.x, risc-v (esp32-c3) "No user defined specialisation of etl::underlying_type for this type"
@@ -510,11 +510,11 @@ Fixes:
#942 Warning on pragma c++20-compat
#951 Can't get call_if to work because of etl::optional
#956 Fix build error (etl::circular_buffer)
-#957 Support heterogenous lookup for maps
+#957 Support heterogeneous lookup for maps
#959 Treat bitset with size_type
#972 Template not allowed warning in parameter pack
#979 QueuedMessageRouter does not work : message are not sent to queue
-#980 Documentation clarification: Add link from endianess to unaligned_type
+#980 Documentation clarification: Add link from endianness to unaligned_type
#982 Added return to etl::optional emplace, fixed typo
#984 Update Base64 Documentation
#986 Added const iterators to span
@@ -639,7 +639,7 @@ Pull Requests:
#905 Added support for type identity
Other:
-Reenabled address sanitizer for VS2022
+Re-enabled address sanitizer for VS2022
20.38.16
diff --git a/docs/timers/_index.md b/docs/timers/_index.md
index 127fda77..a9129c17 100644
--- a/docs/timers/_index.md
+++ b/docs/timers/_index.md
@@ -3,4 +3,4 @@ title: "Timers"
weight: 100
---
-Classes the implement timer based services.
+Classes that implement timer-based services.
diff --git a/docs/timers/callback-timer-interrupt.md b/docs/timers/callback-timer-interrupt.md
index 45834642..54d3b116 100644
--- a/docs/timers/callback-timer-interrupt.md
+++ b/docs/timers/callback-timer-interrupt.md
@@ -196,7 +196,7 @@ Test test;
//***************************************************************************
// The interrupt guard type.
-// Saves and disables on contruction.
+// Saves and disables interrupts on construction.
// Restores on destruction.
//***************************************************************************
struct InterruptGuard
diff --git a/docs/timers/message-timer-interrupt.md b/docs/timers/message-timer-interrupt.md
index 9cbc6d70..c41dc227 100644
--- a/docs/timers/message-timer-interrupt.md
+++ b/docs/timers/message-timer-interrupt.md
@@ -193,7 +193,7 @@ Message3 message3;
//***************************************************************************
// The interrupt guard type.
-// Saves and disables on contruction.
+// Saves and disables on construction.
// Restores on destruction.
//***************************************************************************
struct InterruptGuard
diff --git a/docs/timers/timer.md b/docs/timers/timer.md
index b09785b3..d0d4ed63 100644
--- a/docs/timers/timer.md
+++ b/docs/timers/timer.md
@@ -15,7 +15,7 @@ struct timer
{
// Timer modes.
struct mode
- {
+ {
enum
{
SINGLE_SHOT = false,
diff --git a/docs/tutorials/callback-service.md b/docs/tutorials/callback-service.md
index 972e97c1..fccf4a77 100644
--- a/docs/tutorials/callback-service.md
+++ b/docs/tutorials/callback-service.md
@@ -19,7 +19,7 @@ This code demonstrates using the callback service for five example ARM interrupt
`Timer3` has no entry in the callback service and will therefore trigger execution of the unhandled handler.
`USART1` and `USART2` interrupts are handled by instances of Uart.
-There callbacks are defined withing the class and are initialised in the Uart constructor.
+Their callbacks are defined within the class and are initialised in the Uart constructor.
```cpp
#include
@@ -146,7 +146,7 @@ Uart uart1(0, USART1_IRQ_HANDLER);
Uart uart2(1, USART2_IRQ_HANDLER);
// Declare a global callback for the timer.
-// Uses the most efficient callback type for a class, as everthing is known at compile time.
+// Uses the most efficient callback type for a class, as everything is known at compile time.
etl::function_imp timer_member_callback;
// Declare the callbacks for the free functions.
diff --git a/docs/tutorials/delegate-service.md b/docs/tutorials/delegate-service.md
index edb85f68..cc7dd612 100644
--- a/docs/tutorials/delegate-service.md
+++ b/docs/tutorials/delegate-service.md
@@ -13,7 +13,7 @@ This code demonstrates using the delegate service for five example ARM interrupt
`Timer3` has no entry in the callback service and will therefore trigger execution of the unhandled handler.
`USART1` and `USART2` interrupts are handled by instances of `Uart`.
-There callbacks are defined withing the class and are initialised in the `Uart` constructor.
+Their callbacks are defined within the class and are initialised in the `Uart` constructor.
```cpp
#include
@@ -137,7 +137,7 @@ Uart uart1(0, USART1_IRQ_HANDLER);
Uart uart2(1, USART2_IRQ_HANDLER);
// Declare a global callback for the timer.
-// Uses the most efficient callback type for a class, as everthing is known at compile time.
+// Uses the most efficient callback type for a class, as everything is known at compile time.
etl::delegate timer_member_callback =
etl::delegate::create();
diff --git a/docs/tutorials/shared-message_tutorial.md b/docs/tutorials/shared-message_tutorial.md
index f94efb1b..e692a8d7 100644
--- a/docs/tutorials/shared-message_tutorial.md
+++ b/docs/tutorials/shared-message_tutorial.md
@@ -34,7 +34,7 @@ To this end a template alias is defined; `etl::atomic_counted_message`, which us
In a muti-threaded or interrupt driven system, a method must be derived to manage access to the pool.
All reference counted messages have an owner.
-Owners are obects based on `etl::ireference_counted_message_pool`.
+Owners are objects based on `etl::ireference_counted_message_pool`.
A reference counted message pool will allocate reference counted messages. The storage for these are allocated from a supplied memory block allocator.
@@ -256,7 +256,7 @@ private:
};
//*****************************************************************************
-// A message bus that can accomodate two subscribers.
+// A message bus that can accommodate two subscribers.
//*****************************************************************************
struct Bus : public etl::message_bus<2U>
{
diff --git a/docs/utilities/bit-stream-reader.md b/docs/utilities/bit-stream-reader.md
index bba3e54c..64acaa66 100644
--- a/docs/utilities/bit-stream-reader.md
+++ b/docs/utilities/bit-stream-reader.md
@@ -248,15 +248,15 @@ namespace etl
etl::optional read_unchecked(etl::bit_stream_reader& stream)
{
char c = stream.read_unchecked();
- short s = stream.read_unchecked();
- int32_t i = stream.read_unchecked();
+ short s = stream.read_unchecked(11U);
+ int32_t i = stream.read_unchecked(25U);
return CustomType { c, s, i };
}
}
std::array storage; // Assume the buffer gets filled with bit stream data.
-etl::bit_stream_reader bit_stream(storage.data(), storage.size());
+etl::bit_stream_reader bit_stream(storage.data(), storage.size(), etl::bit_order::msb_first);
// Read unchecked values from the stream.
char c = etl::read_unchecked(bit_stream, 6U);
diff --git a/docs/utilities/bit-stream-writer.md b/docs/utilities/bit-stream-writer.md
index 3d83c0e4..5cc3f4a6 100644
--- a/docs/utilities/bit-stream-writer.md
+++ b/docs/utilities/bit-stream-writer.md
@@ -328,7 +328,7 @@ Sets the delegate to call after every write.
callback_type get_callback() const
```
**Description**
-Gets the function to call afer every write.
+Gets the function to call after every write.
---
@@ -397,13 +397,13 @@ namespace etl
void write_unchecked(etl::bit_stream_reader& stream)
{
stream.write_unchecked();
- stream.write_unchecked();
+ stream.write_unchecked();
stream.write_unchecked();
}
}
std::array storage; // Assume the buffer gets filled with bit stream data.
-etl::bit_stream_reader bit_stream(storage.data(), storage.size());
+etl::bit_stream_writer bit_stream(storage.data(), storage.size(), etl::bit_order::msb_first);
// Write unchecked values to the stream.
etl::write_unchecked(bit_stream, 6U);
diff --git a/docs/utilities/endian.md b/docs/utilities/endian.md
index 1aa2c969..4de8014d 100644
--- a/docs/utilities/endian.md
+++ b/docs/utilities/endian.md
@@ -7,11 +7,11 @@ title: "endian"
Since: `TBC`
{{< /callout >}}
-Constants & utilities for endianess.
+Constants & utilities for endianness.
For endian specific integral types, see `unaligned_type`.
-The values for endianness are dependant on the platform setup.
+The values for endianness are dependent on the platform setup.
If `ETL_ENDIAN_NATIVE` is defined by the user, then
`etl::endian::little = 0`
diff --git a/docs/utilities/error-handler.md b/docs/utilities/error-handler.md
index ab317500..074b199e 100644
--- a/docs/utilities/error-handler.md
+++ b/docs/utilities/error-handler.md
@@ -16,7 +16,7 @@ You have a choice of:
- Error log
- No error checking
-The type of error handler used is dependant on the compile time macro defined.
+The type of error handler used is dependent on the compile time macro defined.
Note: This are usually set as a project wide definition.
| Macro | Actions |
diff --git a/docs/utilities/initializer-list.md b/docs/utilities/initializer-list.md
index 48cd46a1..054e1373 100644
--- a/docs/utilities/initializer-list.md
+++ b/docs/utilities/initializer-list.md
@@ -18,7 +18,7 @@ The `initializer_list` template class is a special case in that it *must* have a
This header will either include the standard `` header, or attempt to define a `std::initializer_list` template class that is compatible with the current compiler.
-The header will define `ETL_USING_INITIALIZER_LIST` to either `1` or `0` dependant of whether `std::initializer_list` is available or not.
+The header will define `ETL_USING_INITIALIZER_LIST` to either `1` or `0` dependent on whether `std::initializer_list` is available or not.
The ETL will select the STL version if you are using the STL and `ETL_FORCE_ETL_INITIALIZER_LIST` is not defined or,
`ETL_FORCE_STD_INITIALIZER_LIST` is defined.
diff --git a/include/etl/bit_stream.h b/include/etl/bit_stream.h
index 8248d9ae..349aa12f 100644
--- a/include/etl/bit_stream.h
+++ b/include/etl/bit_stream.h
@@ -695,7 +695,7 @@ namespace etl
template
typename etl::enable_if::value, bool>::type write(T value, uint_least8_t nbits = CHAR_BIT * sizeof(T))
{
- bool success = (available(nbits) > 0U);
+ bool success = (nbits > 0U) && (available(nbits) > 0U);
if (success)
{
@@ -914,6 +914,7 @@ namespace etl
template
void write_data(T value, uint_least8_t nbits)
{
+ ETL_ASSERT(nbits > 0U, ETL_ERROR_GENERIC("bit_stream_writer::write_data: nbits is zero"));
ETL_ASSERT(nbits <= (CHAR_BIT * sizeof(T)), ETL_ERROR_GENERIC("bit_stream_writer::write_data: nbits too large"));
// Apply the byte order (endianness).
@@ -1305,6 +1306,7 @@ namespace etl
template
T read_value(uint_least8_t nbits, bool is_signed)
{
+ ETL_ASSERT(nbits > 0U, ETL_ERROR_GENERIC("bit_stream_reader::read_value: nbits is zero"));
ETL_ASSERT(nbits <= (CHAR_BIT * sizeof(T)), ETL_ERROR_GENERIC("bit_stream_reader::read_value: nbits too large"));
T value = 0;
diff --git a/include/etl/debounce.h b/include/etl/debounce.h
index 2618d5e3..20a13ab5 100644
--- a/include/etl/debounce.h
+++ b/include/etl/debounce.h
@@ -536,7 +536,10 @@ namespace etl
}
//*************************************************************************
- /// Constructor.
+ /// Sets the count thresholds.
+ ///\param valid The count for a valid state.
+ ///\param hold The count after valid for a hold state. Default = 0.
+ ///\param repeat The count after hold for a key repeat. Default = 0.
//*************************************************************************
void set(count_t valid, count_t hold = 0, count_t repeat = 0)
{
diff --git a/include/etl/private/variant_legacy.h b/include/etl/private/variant_legacy.h
index 59d454d4..585f02e1 100644
--- a/include/etl/private/variant_legacy.h
+++ b/include/etl/private/variant_legacy.h
@@ -468,7 +468,7 @@ namespace etl
explicit variant(etl::in_place_index_t, T const& value)
: type_id(Index)
{
- ETL_STATIC_ASSERT(Type_Id_Lookup::type_id == Index, "Missmatched type");
+ ETL_STATIC_ASSERT(Type_Id_Lookup::type_id == Index, "Mismatched type");
::new (static_cast(data)) T(value);
type_id = Index;
}
diff --git a/include/etl/private/variant_select_do_operator.h b/include/etl/private/variant_select_do_operator.h
index 1fb1794a..42bcb0d0 100644
--- a/include/etl/private/variant_select_do_operator.h
+++ b/include/etl/private/variant_select_do_operator.h
@@ -34,7 +34,7 @@ SOFTWARE.
namespace private_variant
{
//***************************************************************************
- // Selects a do_operator inplementation that is configured for the number of
+ // Selects a do_operator implementation that is configured for the number of
// types.
//***************************************************************************
template
diff --git a/include/etl/private/variant_select_do_visitor.h b/include/etl/private/variant_select_do_visitor.h
index e770af68..58a6e2d6 100644
--- a/include/etl/private/variant_select_do_visitor.h
+++ b/include/etl/private/variant_select_do_visitor.h
@@ -34,7 +34,7 @@ SOFTWARE.
namespace private_variant
{
//***************************************************************************
- // Selects a do_visitor inplementation that is configured for the number of
+ // Selects a do_visitor implementation that is configured for the number of
// types.
//***************************************************************************
template
diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h
index a4751fa3..13d21810 100644
--- a/include/etl/type_traits.h
+++ b/include/etl/type_traits.h
@@ -3317,7 +3317,7 @@ namespace etl
#else
//*********************************************
- // Assume that anything other than arithmetics
+ // Assume that anything other than arithmetic
// and pointers return false for the traits.
//*********************************************
diff --git a/include/etl/unaligned_type.h b/include/etl/unaligned_type.h
index 504317f7..6f4189dc 100644
--- a/include/etl/unaligned_type.h
+++ b/include/etl/unaligned_type.h
@@ -666,7 +666,7 @@ namespace etl
unaligned_type_ext(unaligned_type_ext && other)
: private_unaligned_type::unaligned_type_storage_ext(other.storage)
{
- // If we're constructing from a different endianess then we need to
+ // If we're constructing from a different endianness then we need to
// reverse the data order.
if (Endian != Endian_Other)
{
@@ -728,7 +728,7 @@ namespace etl
{
this->storage = other.storage;
- // If we're assigning from a different endianess then we need to reverse
+ // If we're assigning from a different endianness then we need to reverse
// the data order.
if (Endian != Endian_Other)
{
diff --git a/test/test_histogram.cpp b/test/test_histogram.cpp
index 40f5de20..b0db0263 100644
--- a/test/test_histogram.cpp
+++ b/test/test_histogram.cpp
@@ -270,7 +270,7 @@ namespace
{
IntRuntimeOffsetHistogram histogram1(Start, input2.begin(), input2.end());
- IntRuntimeOffsetHistogram histogram2(Start);
+ IntRuntimeOffsetHistogram histogram2(Start + 1);
histogram2 = histogram1;
for (int key = Start; key < Start + static_cast(Size); ++key)
@@ -300,7 +300,7 @@ namespace
IntRuntimeOffsetHistogram histogram1(Start, input2.begin(), input2.end());
IntRuntimeOffsetHistogram histogram_source(Start, input2.begin(), input2.end());
- IntRuntimeOffsetHistogram histogram2(Start);
+ IntRuntimeOffsetHistogram histogram2(Start + 1);
histogram2 = etl::move(histogram_source);
for (int key = Start; key < Start + static_cast(Size); ++key)
diff --git a/test/test_vector.cpp b/test/test_vector.cpp
index b9957e5d..026e2176 100644
--- a/test/test_vector.cpp
+++ b/test/test_vector.cpp
@@ -1143,9 +1143,12 @@ namespace
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
- compare_data.erase(compare_data.begin() + 2, compare_data.begin() + 4);
+ Compare_Data::iterator cdi = compare_data.erase(compare_data.begin() + 2, compare_data.begin() + 4);
- data.erase(data.begin() + 2, data.begin() + 4);
+ Data::iterator di = data.erase(data.begin() + 2, data.begin() + 4);
+
+ CHECK(cdi == compare_data.begin() + 2);
+ CHECK(di == data.begin() + 2);
CHECK_EQUAL(compare_data.size(), data.size());
diff --git a/test/test_vector_function_pointer.cpp b/test/test_vector_function_pointer.cpp
index 62b18a71..0f95ae4f 100644
--- a/test/test_vector_function_pointer.cpp
+++ b/test/test_vector_function_pointer.cpp
@@ -301,7 +301,7 @@ namespace
CHECK_EQUAL(0U, data.size());
CHECK_EQUAL(initial_data.size(), other_data.size());
- bool is_equal = std::equal(data.begin(), data.end(), other_data.begin());
+ bool is_equal = std::equal(initial_data.begin(), initial_data.end(), other_data.begin());
CHECK(is_equal);
}
diff --git a/test/test_vector_function_pointer_external_buffer.cpp b/test/test_vector_function_pointer_external_buffer.cpp
index 4a6d5a86..70ef97ec 100644
--- a/test/test_vector_function_pointer_external_buffer.cpp
+++ b/test/test_vector_function_pointer_external_buffer.cpp
@@ -288,7 +288,7 @@ namespace
CHECK_EQUAL(0U, data.size());
CHECK_EQUAL(initial_data.size(), other_data.size());
- bool is_equal = std::equal(data.begin(), data.end(), other_data.begin());
+ bool is_equal = std::equal(initial_data.begin(), initial_data.end(), other_data.begin());
CHECK(is_equal);
}
diff --git a/test/test_vector_member_function_pointer.cpp b/test/test_vector_member_function_pointer.cpp
index a1828db7..6b8e1512 100644
--- a/test/test_vector_member_function_pointer.cpp
+++ b/test/test_vector_member_function_pointer.cpp
@@ -311,7 +311,7 @@ namespace
CHECK_EQUAL(0U, data.size());
CHECK_EQUAL(initial_data.size(), other_data.size());
- bool is_equal = std::equal(data.begin(), data.end(), other_data.begin());
+ bool is_equal = std::equal(initial_data.begin(), initial_data.end(), other_data.begin());
CHECK(is_equal);
}
diff --git a/test/test_vector_member_function_pointer_external_buffer.cpp b/test/test_vector_member_function_pointer_external_buffer.cpp
index 644fbf92..b94358c3 100644
--- a/test/test_vector_member_function_pointer_external_buffer.cpp
+++ b/test/test_vector_member_function_pointer_external_buffer.cpp
@@ -316,7 +316,7 @@ namespace
CHECK_EQUAL(0U, data.size());
CHECK_EQUAL(initial_data.size(), other_data.size());
- bool is_equal = std::equal(data.begin(), data.end(), other_data.begin());
+ bool is_equal = std::equal(initial_data.begin(), initial_data.end(), other_data.begin());
CHECK(is_equal);
}