Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: queueEx.h
- Revision:
- 3:3b438c482048
- Parent:
- 2:68ce6bdc0714
--- a/queueEx.h Mon Nov 22 06:53:43 2021 +0000
+++ b/queueEx.h Mon Nov 22 08:15:36 2021 +0000
@@ -17,13 +17,14 @@
public:
QueueEx(int iSize, int iCount) : Queue(iSize, iCount){
}
- bool PeekAll(char* pvItem){
+ bool PeekAll(void* pvItem){
+ unsigned char *pv = (unsigned char*)pvItem;
unsigned char *p = m_pnRdIndex;
int n = m_iLclCount;
if (n > 0){
do {
- memcpy( pvItem, p, m_iSize );
- pvItem += m_iSize;
+ memcpy( pv, p, m_iSize );
+ pv += m_iSize;
p += m_iSize;
if ( p >= m_pnTail ) p = m_pnHead;
} while(--n);