diff options
author | David Robillard <d@drobilla.net> | 2022-12-14 17:47:56 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-14 18:04:27 -0500 |
commit | 055d305ffe1eb9375e917708faf968e65751ab82 (patch) | |
tree | 8e4eda04e0fb9e49123067c564804949de7f3037 /src/client | |
parent | c57a4fd74afe56fcece6b6f5f36146c9c57e7108 (diff) | |
download | ingen-055d305ffe1eb9375e917708faf968e65751ab82.tar.gz ingen-055d305ffe1eb9375e917708faf968e65751ab82.tar.bz2 ingen-055d305ffe1eb9375e917708faf968e65751ab82.zip |
Avoid implicit conversions
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/BlockModel.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp index 7448ca6c..998c118d 100644 --- a/src/client/BlockModel.cpp +++ b/src/client/BlockModel.cpp @@ -202,8 +202,9 @@ BlockModel::default_port_value_range( } if (port->port_property(_uris.lv2_sampleRate)) { - min *= srate; - max *= srate; + const auto frate = static_cast<float>(srate); + min *= frate; + max *= frate; } } @@ -232,8 +233,9 @@ BlockModel::port_value_range(const std::shared_ptr<const PortModel>& port, } if (port->port_property(_uris.lv2_sampleRate)) { - min *= srate; - max *= srate; + const auto frate = static_cast<float>(srate); + min *= frate; + max *= frate; } } |