summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Configuration.cpp2
-rw-r--r--src/client/BlockModel.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 705594c9..aaf421cb 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -134,7 +134,7 @@ Configuration::print_usage(const std::string& program, std::ostream& os)
} else {
os << " ";
}
- os.width(_max_name_length + 11);
+ os.width(static_cast<std::streamsize>(_max_name_length + 11));
os << std::left;
os << (std::string("--") + o.first + variable_string(option.type));
os << option.desc << std::endl;
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;
}
}