I might later question this decision. I liked how each "hardware" example was roughly one self-contained file. In the "input_keyboard" case, this is no longer true.
11 lines
174 B
C++
11 lines
174 B
C++
#include <stdint.h>
|
|
|
|
template <typename T>
|
|
inline void copy(T * dst, const T * src, int32_t n) noexcept
|
|
{
|
|
while (n > 0) {
|
|
*dst++ = *src++;
|
|
n -= (sizeof (T));
|
|
}
|
|
}
|