diff options
author | David Robillard <d@drobilla.net> | 2019-12-08 19:42:16 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-08 21:08:26 +0100 |
commit | 9a2c78b83adfcd654539a89f9a7b00ce47ccdd71 (patch) | |
tree | b348835de40ee1c236bb5a43508a2170dc906ede /src | |
parent | 484665f577267dac4ccd722bc28239a73c6efdb4 (diff) | |
download | ingen-9a2c78b83adfcd654539a89f9a7b00ce47ccdd71.tar.gz ingen-9a2c78b83adfcd654539a89f9a7b00ce47ccdd71.tar.bz2 ingen-9a2c78b83adfcd654539a89f9a7b00ce47ccdd71.zip |
Cleanup: Remove unnecessary numeric conversions
Diffstat (limited to 'src')
-rw-r--r-- | src/server/ControlBindings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index 2e1f9d06..4a0f5f20 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -243,7 +243,7 @@ ControlBindings::control_to_port_value(RunContext& context, normal = (float)value / 16383.0f; break; case Type::MIDI_NOTE: - normal = (value == 0.0f) ? 0.0f : 1.0f; + normal = (value == 0) ? 0.0f : 1.0f; break; default: break; @@ -284,7 +284,7 @@ ControlBindings::port_value_to_control(RunContext& context, } if (port->is_logarithmic()) { - normal = logf(normal * ((float)M_E - 1.0f) + 1.0); + normal = logf(normal * ((float)M_E - 1.0f) + 1.0f); } switch (type) { |