diff options
author | David Robillard <d@drobilla.net> | 2023-05-12 09:43:30 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-12 09:43:30 -0400 |
commit | ed09a166b6b3c48f1f1d85f9bfd77ef00a463088 (patch) | |
tree | ff1c10ae67d5637c642384a883fe990fe478a22e /include/ingen | |
parent | 06ed19d4ef9250f772ce6192640ab25ea0d5c4f4 (diff) | |
download | ingen-ed09a166b6b3c48f1f1d85f9bfd77ef00a463088.tar.gz ingen-ed09a166b6b3c48f1f1d85f9bfd77ef00a463088.tar.bz2 ingen-ed09a166b6b3c48f1f1d85f9bfd77ef00a463088.zip |
Fix implicit widening conversions
Diffstat (limited to 'include/ingen')
-rw-r--r-- | include/ingen/AtomForge.hpp | 2 | ||||
-rw-r--r-- | include/ingen/Clock.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp index 81f36b5b..cf5a759d 100644 --- a/include/ingen/AtomForge.hpp +++ b/include/ingen/AtomForge.hpp @@ -76,7 +76,7 @@ private: /// Append some data and return a reference to its start intptr_t append(const void* data, uint32_t len) { // Record offset of the start of this write (+1 to avoid null) - const intptr_t ref = _size + 1; + const auto ref = static_cast<intptr_t>(_size + 1U); // Update size and reallocate if necessary if (lv2_atom_pad_size(_size + len) > _capacity) { diff --git a/include/ingen/Clock.hpp b/include/ingen/Clock.hpp index 551202a7..75575aa5 100644 --- a/include/ingen/Clock.hpp +++ b/include/ingen/Clock.hpp @@ -48,8 +48,8 @@ private: uint64_t now_microseconds() const { struct timespec time{}; clock_gettime(_clock, &time); - return static_cast<uint64_t>(time.tv_sec) * 1e6 + - static_cast<uint64_t>(time.tv_nsec) / 1e3; + return static_cast<uint64_t>(time.tv_sec) * 1000000U + + static_cast<uint64_t>(time.tv_nsec) / 100U; } private: |