ringbuffer: use a namespace for ringbuffer to avoid 'multiple definitions in vtable' bug

This commit is contained in:
Ban Siesta
2015-05-24 10:02:08 +01:00
parent b9ce447cc9
commit aac276872b
3 changed files with 14 additions and 10 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (C) 2013 PX4 Development Team. All rights reserved.
* Copyright (C) 2013-2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,6 +40,9 @@
#include "ringbuffer.h"
#include <string.h>
namespace ringbuffer
{
RingBuffer::RingBuffer(unsigned num_items, size_t item_size) :
_num_items(num_items),
_item_size(item_size),
@@ -398,3 +401,5 @@ RingBuffer::print_info(const char *name)
_tail,
_buf);
}
} // namespace ringbuffer