Skip to content

Commit

Permalink
Fix code formatting inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w committed Sep 17, 2017
1 parent 73728d7 commit aebbe22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/MemoryHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
class MemoryHelper {
public:

static void* alignedMalloc(size_t );
static void* alignedMalloc( size_t );

static void alignedFree( void* );

Expand Down
10 changes: 5 additions & 5 deletions include/MemoryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct MemoryPool
MemoryPool( size_t chunks ) :
m_chunks( chunks )
{
m_free = reinterpret_cast<char*>(MemoryHelper::alignedMalloc( chunks ));
m_free = reinterpret_cast<char*>( MemoryHelper::alignedMalloc( chunks ) );
memset( m_free, 1, chunks );
}

Expand Down Expand Up @@ -109,17 +109,17 @@ struct MmAllocator
typedef T value_type;
template< class U > struct rebind { typedef MmAllocator<U> other; };

T* allocate(std::size_t n)
T* allocate( std::size_t n )
{
return reinterpret_cast<T*>( MemoryManager::alloc( sizeof(T) * n ) );
}

void deallocate(T* p, std::size_t)
void deallocate( T* p, std::size_t )
{
MemoryManager::free( p );
}

typedef std::vector<T, MmAllocator<T> > vector;
typedef std::vector<T, MmAllocator<T>> vector;
};


Expand All @@ -143,7 +143,7 @@ static void operator delete[] ( void * ptr ) \
}

// for use in cases where overriding new/delete isn't a possibility
#define MM_ALLOC( type, count ) reinterpret_cast<type*>(MemoryManager::alloc( sizeof( type ) * count ))
#define MM_ALLOC( type, count ) reinterpret_cast<type*>( MemoryManager::alloc( sizeof( type ) * count ) )
// and just for symmetry...
#define MM_FREE( ptr ) MemoryManager::free( ptr )

Expand Down
4 changes: 2 additions & 2 deletions src/core/BufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ void BufferManager::init( fpp_t framesPerPeriod )

sampleFrame * BufferManager::acquire()
{
return MM_ALLOC(sampleFrame, ::framesPerPeriod);
return MM_ALLOC( sampleFrame, ::framesPerPeriod );
}

void BufferManager::clear(sampleFrame *ab, const f_cnt_t frames, const f_cnt_t offset)
void BufferManager::clear( sampleFrame *ab, const f_cnt_t frames, const f_cnt_t offset )
{
memset( ab + offset, 0, sizeof( *ab ) * frames );
}
Expand Down

0 comments on commit aebbe22

Please sign in to comment.