From 38c8d4ff8fcbfea580ea90c254ba03e5d0e77859 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Fri, 29 Jan 2021 18:09:21 +0000 Subject: [PATCH] Remove unused code from CDCDataStream --- 32blit-stm32/Inc/CDCDataStream.h | 68 -------------------------------- 1 file changed, 68 deletions(-) diff --git a/32blit-stm32/Inc/CDCDataStream.h b/32blit-stm32/Inc/CDCDataStream.h index e5f26dd03..2657d60fd 100644 --- a/32blit-stm32/Inc/CDCDataStream.h +++ b/32blit-stm32/Inc/CDCDataStream.h @@ -13,39 +13,6 @@ #include #include -class CDCMemBuffer : public std::basic_streambuf -{ -public: - CDCMemBuffer(const uint8_t *pData, size_t uLen) - { - setg((char*)pData, (char*)pData, (char*)pData + uLen); - } - - void SetData(const uint8_t *pData, size_t uLen) - { - setg((char*)pData, (char*)pData, (char*)pData + uLen); - } -}; - -class CDCMemoryStream : public std::istream -{ -public: - CDCMemoryStream(const uint8_t *pData = NULL , size_t uLen = 0) : std::istream(&m_buffer), m_buffer(pData, uLen) - { - rdbuf(&m_buffer); - } - - void SetData(const uint8_t *pData, size_t uLen) - { - clear(); - m_buffer.SetData(pData, uLen); - rdbuf(&m_buffer); - } -private: - CDCMemBuffer m_buffer; -}; - - class CDCDataStream { public: @@ -68,41 +35,6 @@ class CDCDataStream return m_uLen; } - - bool GetMemoryStream(CDCMemoryStream &ms) - { - bool bResult = false; - - uint8_t *pData; - uint32_t uLen; - if(uLen) - { - ms.SetData(pData, uLen); - bResult = true; - } - - return bResult; - } - - - bool GetStreamData(uint8_t **ppData, uint32_t *puLen) - { - bool bResult = true; - - if(m_uLen) - { - *ppData = m_pData; - *puLen = m_uLen; - m_uLen = 0; - } - else - { - bResult = false; - } - - return bResult; - } - bool GetDataOfLength(void *pData, uint8_t uLen) { bool bResult = false;