summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-07-17 11:33:25 -0400
committerDavid Robillard <d@drobilla.net>2024-07-17 12:30:47 -0400
commit175c04323ad1aaaa1e0c949b8de411d5e2cece74 (patch)
treeac359693858f9ba2e619f2d9fc9b809af637a82e /src/server/events
parent973db12fe33bab8e6efca80deca358b4998d5eb2 (diff)
downloadingen-175c04323ad1aaaa1e0c949b8de411d5e2cece74.tar.gz
ingen-175c04323ad1aaaa1e0c949b8de411d5e2cece74.tar.bz2
ingen-175c04323ad1aaaa1e0c949b8de411d5e2cece74.zip
Avoid C-style casts and some size type conversions
Aside from the syntactic cast changes, reduces some size types to 32-bits, since they can never be so large in practice. This eliminates some type conversions and shaves a few bytes.
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Delete.cpp2
-rw-r--r--src/server/events/Get.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index 62653752..bcebe2ba 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -225,7 +225,7 @@ Delete::undo(Interface& target)
if (c.first != _msg.uri.path()) {
target.set_property(path_to_uri(c.first),
uris.lv2_index,
- forge.make(int32_t(c.second.first)));
+ forge.make(static_cast<int32_t>(c.second.first)));
}
}
}
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 9efef123..385e55f3 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -105,11 +105,11 @@ Get::post_process()
URIs& uris = _engine.world().uris();
Properties props = {
{ uris.param_sampleRate,
- uris.forge.make(int32_t(_engine.sample_rate())) },
+ uris.forge.make(static_cast<int32_t>(_engine.sample_rate())) },
{ uris.bufsz_maxBlockLength,
- uris.forge.make(int32_t(_engine.block_length())) },
+ uris.forge.make(static_cast<int32_t>(_engine.block_length())) },
{ uris.ingen_numThreads,
- uris.forge.make(int32_t(_engine.n_threads())) } };
+ uris.forge.make(static_cast<int32_t>(_engine.n_threads())) } };
const Properties load_props = _engine.load_properties();
props.insert(load_props.begin(), load_props.end());