Skip to content

Commit

Permalink
Merge pull request #94 from mikepurvis/patch-1
Browse files Browse the repository at this point in the history
Initialize linear buffer from void pointer.
  • Loading branch information
andysworkshop committed Feb 21, 2015
2 parents 7844605 + 93c367b commit f4a0507
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/include/stream/BufferedInputOutputStream.h
Expand Up @@ -56,8 +56,8 @@ namespace stm32plus {
* @param[in] size The size of the caller supplied buffer
*/

BufferedInputOutputStream(uint8_t *buffer,uint32_t size) {
_readPtr=_writePtr=_buffer=buffer;
BufferedInputOutputStream(void *buffer,uint32_t size) {
_readPtr=_writePtr=_buffer=static_cast<uint8_t*>(buffer);
_bufferSize=size;
_needToFree=false;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/include/stream/LinearBufferInputOutputStream.h
Expand Up @@ -22,7 +22,7 @@ namespace stm32plus {

// constructors

LinearBufferInputOutputStream(uint8_t *buffer,uint32_t size);
LinearBufferInputOutputStream(void *buffer,uint32_t size);
LinearBufferInputOutputStream(uint32_t initialSize);

void resetOutput();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/stream/LinearBufferInputOutputStream.cpp
Expand Up @@ -18,7 +18,7 @@ namespace stm32plus {
* @param size
*/

LinearBufferInputOutputStream::LinearBufferInputOutputStream(uint8_t *buffer,uint32_t size)
LinearBufferInputOutputStream::LinearBufferInputOutputStream(void *buffer,uint32_t size)
: BufferedInputOutputStream(buffer,size) {
}

Expand Down

0 comments on commit f4a0507

Please sign in to comment.