Changeset 3090


Ignore:
Timestamp:
Apr 28, 2013, 2:03:41 PM (6 years ago)
Author:
cameron
Message:

Use char as base type for buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/buffer.hpp

    r2561 r3090  
    1818    ATTRIBUTE_SIMD_ALIGN BitBlock aligned_##base_ptr[buffer_size/sizeof(BitBlock)]; \
    1919    assert_bitblock_align((void*)aligned_##base_ptr);\
    20     base_ptr = (uint8_t *)&aligned_##base_ptr[0];\
     20    base_ptr = (char *)&aligned_##base_ptr[0];\
    2121
    2222#define ALLOC_STATIC_ALIGNED_BITBLOCK_BUFFER(base_ptr, buffer_size) \
     
    3030    ATTRIBUTE_SIMD_ALIGN BitBlock aligned_##base_ptr[BUFFER_SIZE/sizeof(BitBlock)]; \
    3131    assert_bitblock_align((void*)aligned_##base_ptr);\
    32     copyback_ptr = (uint8_t *)aligned_##base_ptr; \
     32    copyback_ptr = (char *)aligned_##base_ptr; \
    3333    memset(copyback_ptr,0,COPYBACK_SIZE); \
    3434    base_ptr = &copyback_ptr[COPYBACK_SIZE]; \
     
    4343#define COPY_BACK_BYTE_BUFFER(copyback_ptr, base_ptr) \
    4444do {    void * dest = copyback_ptr;\
    45     void * src = (uint8_t *)base_ptr + (SEGMENT_SIZE - COPYBACK_SIZE);\
     45    void * src = (char *)base_ptr + (SEGMENT_SIZE - COPYBACK_SIZE);\
    4646    assert_bitblock_align(src);\
    4747    assert_bitblock_align(dest);\
     
    5151#define COPY_BACK_BITBLOCK_BUFFER(copyback_ptr, base_ptr) \
    5252do {    void * dest = copyback_ptr;\
    53     void * src = (uint8_t *)base_ptr + ((SEGMENT_SIZE - COPYBACK_SIZE)/8);\
     53    void * src = (char *)base_ptr + ((SEGMENT_SIZE - COPYBACK_SIZE)/8);\
    5454    assert_bitblock_align(src);\
    5555    assert_bitblock_align(dest);\
Note: See TracChangeset for help on using the changeset viewer.