summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Array.hpp9
-rw-r--r--raul/TimeStamp.hpp9
-rw-r--r--test/ringbuffer_test.cpp2
3 files changed, 14 insertions, 6 deletions
diff --git a/raul/Array.hpp b/raul/Array.hpp
index 2c338e4..0675701 100644
--- a/raul/Array.hpp
+++ b/raul/Array.hpp
@@ -35,13 +35,15 @@ class Array : public Maid::Disposable
{
public:
explicit Array(size_t size = 0)
- : _size(size)
+ : Maid::Disposable()
+ , _size(size)
, _elems(size ? new T[size] : nullptr)
{
}
Array(size_t size, T initial_value)
- : _size(size)
+ : Maid::Disposable()
+ , _size(size)
, _elems(size ? new T[size] : nullptr)
{
if (size > 0) {
@@ -52,7 +54,8 @@ public:
}
Array(const Array<T>& array)
- : _size(array._size)
+ : Maid::Disposable()
+ , _size(array._size)
, _elems(_size ? new T[_size] : nullptr)
{
for (size_t i = 0; i < _size; ++i) {
diff --git a/raul/TimeStamp.hpp b/raul/TimeStamp.hpp
index 34992c9..c07a552 100644
--- a/raul/TimeStamp.hpp
+++ b/raul/TimeStamp.hpp
@@ -40,7 +40,10 @@ public:
/** `ppt` (parts per tick) is the sample rate for FRAMES, PPQN for BEATS,
* and ignored for SECONDS.
*/
- inline TimeUnit(Type type, uint32_t ppt) {
+ inline TimeUnit(Type type, uint32_t ppt)
+ : _type(type)
+ , _ppt(ppt)
+ {
assert(type == SECONDS || ppt != 0);
_type = type;
_ppt = ppt;
@@ -84,7 +87,9 @@ public:
{}
inline TimeStamp(TimeUnit unit, double dec)
- : _unit(unit)
+ : _ticks(0u)
+ , _subticks(0u)
+ , _unit(unit)
{
dec = std::max(0.0, dec);
dec = std::min(double(std::numeric_limits<uint32_t>::max()), dec);
diff --git a/test/ringbuffer_test.cpp b/test/ringbuffer_test.cpp
index 4527902..519b0c3 100644
--- a/test/ringbuffer_test.cpp
+++ b/test/ringbuffer_test.cpp
@@ -34,7 +34,7 @@ namespace {
using RingBuffer = Raul::RingBuffer;
struct Context {
- std::unique_ptr<RingBuffer> ring;
+ std::unique_ptr<RingBuffer> ring{};
size_t n_writes{0};
};