summaryrefslogtreecommitdiffstats
path: root/raul/TimeStamp.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-17 19:31:23 +0200
committerDavid Robillard <d@drobilla.net>2020-07-17 19:59:47 +0200
commit9788bd372ebd949d14f8656b3ce171202f4d7e8b (patch)
tree7234040718a58e53edb0441b3890f86402eca8fb /raul/TimeStamp.hpp
parent38985664a60f2caf1576c32f01866b09183136cd (diff)
downloadraul-9788bd372ebd949d14f8656b3ce171202f4d7e8b.tar.gz
raul-9788bd372ebd949d14f8656b3ce171202f4d7e8b.tar.bz2
raul-9788bd372ebd949d14f8656b3ce171202f4d7e8b.zip
Add missing initializations
Diffstat (limited to 'raul/TimeStamp.hpp')
-rw-r--r--raul/TimeStamp.hpp9
1 files changed, 7 insertions, 2 deletions
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);