summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy2
-rw-r--r--include/ingen/AtomForge.hpp10
-rw-r--r--include/ingen/Configuration.hpp2
-rw-r--r--include/ingen/Log.hpp4
-rw-r--r--include/ingen/SocketReader.hpp10
-rw-r--r--include/ingen/TurtleWriter.hpp4
-rw-r--r--include/ingen/client/PluginModel.hpp2
-rw-r--r--include/ingen/client/PluginUI.hpp10
-rw-r--r--meson.build1
-rw-r--r--src/Configuration.cpp1
-rw-r--r--src/LV2Features.cpp8
-rw-r--r--src/Log.cpp2
-rw-r--r--src/Serialiser.cpp6
-rw-r--r--src/SocketReader.cpp5
-rw-r--r--src/TurtleWriter.cpp17
-rw-r--r--src/World.cpp9
-rw-r--r--src/client/PluginModel.cpp1
-rw-r--r--src/client/PluginUI.cpp1
-rw-r--r--src/gui/.clang-tidy1
-rw-r--r--src/gui/App.cpp9
-rw-r--r--src/gui/App.hpp18
-rw-r--r--src/gui/BreadCrumbs.cpp1
-rw-r--r--src/gui/BreadCrumbs.hpp2
-rw-r--r--src/gui/ConnectWindow.cpp21
-rw-r--r--src/gui/ConnectWindow.hpp44
-rw-r--r--src/gui/GraphCanvas.cpp4
-rw-r--r--src/gui/GraphCanvas.hpp8
-rw-r--r--src/gui/GraphPortModule.cpp1
-rw-r--r--src/gui/GraphPortModule.hpp2
-rw-r--r--src/gui/GraphTreeWindow.cpp2
-rw-r--r--src/gui/GraphTreeWindow.hpp7
-rw-r--r--src/gui/GraphWindow.cpp4
-rw-r--r--src/gui/GraphWindow.hpp8
-rw-r--r--src/gui/MessagesWindow.hpp6
-rw-r--r--src/gui/NewSubgraphWindow.hpp10
-rw-r--r--src/gui/NodeMenu.cpp1
-rw-r--r--src/gui/NodeMenu.hpp10
-rw-r--r--src/gui/NodeModule.cpp3
-rw-r--r--src/gui/NodeModule.hpp8
-rw-r--r--src/gui/ObjectMenu.cpp7
-rw-r--r--src/gui/ObjectMenu.hpp22
-rw-r--r--src/gui/PortMenu.cpp1
-rw-r--r--src/gui/PortMenu.hpp12
-rw-r--r--src/gui/PropertiesWindow.cpp1
-rw-r--r--src/gui/PropertiesWindow.hpp20
-rw-r--r--src/gui/RenameWindow.hpp10
-rw-r--r--src/gui/Style.cpp21
-rw-r--r--src/gui/Style.hpp11
-rw-r--r--src/gui/ThreadedLoader.cpp2
-rw-r--r--src/gui/ThreadedLoader.hpp4
-rw-r--r--src/gui/WindowFactory.cpp5
-rw-r--r--src/gui/WindowFactory.hpp12
-rw-r--r--src/gui/ingen_gui_lv2.cpp18
-rw-r--r--src/server/.clang-tidy3
-rw-r--r--src/server/BlockFactory.cpp1
-rw-r--r--src/server/BlockFactory.hpp2
-rw-r--r--src/server/BlockImpl.cpp3
-rw-r--r--src/server/BlockImpl.hpp6
-rw-r--r--src/server/Buffer.cpp3
-rw-r--r--src/server/Buffer.hpp6
-rw-r--r--src/server/BufferFactory.cpp1
-rw-r--r--src/server/BufferFactory.hpp10
-rw-r--r--src/server/Engine.cpp6
-rw-r--r--src/server/Engine.hpp12
-rw-r--r--src/server/EnginePort.hpp9
-rw-r--r--src/server/EventWriter.cpp1
-rw-r--r--src/server/EventWriter.hpp2
-rw-r--r--src/server/GraphImpl.cpp1
-rw-r--r--src/server/GraphImpl.hpp2
-rw-r--r--src/server/InputPort.cpp1
-rw-r--r--src/server/InputPort.hpp4
-rw-r--r--src/server/JackDriver.cpp18
-rw-r--r--src/server/JackDriver.hpp24
-rw-r--r--src/server/LV2Block.cpp1
-rw-r--r--src/server/LV2Block.hpp2
-rw-r--r--src/server/PluginImpl.hpp6
-rw-r--r--src/server/PortAudioDriver.cpp8
-rw-r--r--src/server/PortAudioDriver.hpp16
-rw-r--r--src/server/PortImpl.cpp12
-rw-r--r--src/server/PortImpl.hpp24
-rw-r--r--src/server/PreProcessor.cpp5
-rw-r--r--src/server/PreProcessor.hpp10
-rw-r--r--src/server/RunContext.cpp9
-rw-r--r--src/server/RunContext.hpp24
-rw-r--r--src/server/Task.hpp15
-rw-r--r--src/server/UndoStack.hpp7
-rw-r--r--src/server/Worker.cpp2
-rw-r--r--src/server/Worker.hpp4
-rw-r--r--src/server/events/Connect.cpp2
-rw-r--r--src/server/events/Connect.hpp4
-rw-r--r--src/server/events/Copy.cpp3
-rw-r--r--src/server/events/Copy.hpp6
-rw-r--r--src/server/events/CreateBlock.cpp2
-rw-r--r--src/server/events/CreateBlock.hpp4
-rw-r--r--src/server/events/CreateGraph.cpp2
-rw-r--r--src/server/events/CreateGraph.hpp4
-rw-r--r--src/server/events/CreatePort.cpp4
-rw-r--r--src/server/events/CreatePort.hpp8
-rw-r--r--src/server/events/Delete.cpp2
-rw-r--r--src/server/events/Delete.hpp2
-rw-r--r--src/server/events/Delta.cpp16
-rw-r--r--src/server/events/Delta.hpp8
-rw-r--r--src/server/events/Disconnect.cpp1
-rw-r--r--src/server/events/Disconnect.hpp2
-rw-r--r--src/server/events/Get.cpp2
-rw-r--r--src/server/events/Get.hpp4
-rw-r--r--src/server/ingen_lv2.cpp18
-rw-r--r--src/server/internals/Controller.cpp1
-rw-r--r--src/server/internals/Controller.hpp2
-rw-r--r--src/server/internals/Note.cpp1
-rw-r--r--src/server/internals/Note.hpp2
-rw-r--r--src/server/internals/Trigger.cpp1
-rw-r--r--src/server/internals/Trigger.hpp2
113 files changed, 277 insertions, 497 deletions
diff --git a/.clang-tidy b/.clang-tidy
index f1169de2..90b39dcb 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -3,7 +3,6 @@ Checks: >
-*-avoid-c-arrays,
-*-else-after-return,
-*-magic-numbers,
- -*-member-init,
-*-named-parameter,
-*-narrowing-conversions,
-*-non-private-member-variables-in-classes,
@@ -35,7 +34,6 @@ Checks: >
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
- -cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp
index bc44b698..29e890c1 100644
--- a/include/ingen/AtomForge.hpp
+++ b/include/ingen/AtomForge.hpp
@@ -40,8 +40,6 @@ class AtomForge : public LV2_Atom_Forge
public:
explicit AtomForge(LV2_URID_Map& map)
: LV2_Atom_Forge{}
- , _size{0}
- , _capacity{8 * sizeof(LV2_Atom)}
, _sratom{sratom_new(&map)}
, _buf{static_cast<LV2_Atom*>(calloc(8, sizeof(LV2_Atom)))}
{
@@ -117,10 +115,10 @@ private:
return static_cast<AtomForge*>(self)->deref(ref);
}
- size_t _size; ///< Current atom size
- size_t _capacity; ///< Allocated size of atom buffer
- SratomPtr _sratom; ///< Atom serialiser
- AtomPtr _buf; ///< Atom buffer
+ size_t _size{0}; ///< Current atom size
+ size_t _capacity{8 * sizeof(LV2_Atom)}; ///< Allocated size of buffer
+ SratomPtr _sratom; ///< Atom serialiser
+ AtomPtr _buf; ///< Atom buffer
};
} // namespace ingen
diff --git a/include/ingen/Configuration.hpp b/include/ingen/Configuration.hpp
index 16c20811..d62f98c6 100644
--- a/include/ingen/Configuration.hpp
+++ b/include/ingen/Configuration.hpp
@@ -152,7 +152,7 @@ private:
Options _options;
Keys _keys;
ShortNames _short_names;
- size_t _max_name_length;
+ size_t _max_name_length{0};
};
} // namespace ingen
diff --git a/include/ingen/Log.hpp b/include/ingen/Log.hpp
index 5310c768..e6c08c78 100644
--- a/include/ingen/Log.hpp
+++ b/include/ingen/Log.hpp
@@ -99,8 +99,8 @@ private:
LV2_Log_Log* _log;
URIs& _uris;
Sink _sink;
- bool _flush;
- bool _trace;
+ bool _flush{false};
+ bool _trace{false};
};
} // namespace ingen
diff --git a/include/ingen/SocketReader.hpp b/include/ingen/SocketReader.hpp
index f86a9bd6..409631d9 100644
--- a/include/ingen/SocketReader.hpp
+++ b/include/ingen/SocketReader.hpp
@@ -72,12 +72,12 @@ private:
World& _world;
Interface& _iface;
- SerdEnv* _env;
- SordInserter* _inserter;
- SordNode* _msg_node;
+ SerdEnv* _env{nullptr};
+ SordInserter* _inserter{nullptr};
+ SordNode* _msg_node{nullptr};
std::shared_ptr<raul::Socket> _socket;
- int _socket_error;
- bool _exit_flag;
+ int _socket_error{0};
+ bool _exit_flag{false};
std::thread _thread;
};
diff --git a/include/ingen/TurtleWriter.hpp b/include/ingen/TurtleWriter.hpp
index d9aa13d3..b3d9f658 100644
--- a/include/ingen/TurtleWriter.hpp
+++ b/include/ingen/TurtleWriter.hpp
@@ -57,11 +57,11 @@ protected:
URIMap& _map;
Sratom* _sratom;
SerdNode _base;
- SerdURI _base_uri;
+ SerdURI _base_uri{SERD_URI_NULL};
SerdEnv* _env;
SerdWriter* _writer;
URI _uri;
- bool _wrote_prefixes;
+ bool _wrote_prefixes{false};
};
} // namespace ingen
diff --git a/include/ingen/client/PluginModel.hpp b/include/ingen/client/PluginModel.hpp
index b0a61e94..7f86f680 100644
--- a/include/ingen/client/PluginModel.hpp
+++ b/include/ingen/client/PluginModel.hpp
@@ -124,7 +124,7 @@ private:
Atom _type;
const LilvPlugin* _lilv_plugin;
Presets _presets;
- bool _fetched;
+ bool _fetched{false};
};
} // namespace client
diff --git a/include/ingen/client/PluginUI.hpp b/include/ingen/client/PluginUI.hpp
index 35a14bd2..402e4b0f 100644
--- a/include/ingen/client/PluginUI.hpp
+++ b/include/ingen/client/PluginUI.hpp
@@ -99,11 +99,11 @@ private:
ingen::World& _world;
std::shared_ptr<const BlockModel> _block;
- SuilInstance* _instance;
- LilvUIs* _uis;
- const LilvUI* _ui;
- LilvNode* _ui_node;
- LilvNode* _ui_type;
+ SuilInstance* _instance{nullptr};
+ LilvUIs* _uis{nullptr};
+ const LilvUI* _ui{nullptr};
+ LilvNode* _ui_node{nullptr};
+ LilvNode* _ui_type{nullptr};
std::set<uint32_t> _subscribed_ports;
static SuilHost* ui_host;
diff --git a/meson.build b/meson.build
index 619d2189..0a5f134e 100644
--- a/meson.build
+++ b/meson.build
@@ -102,6 +102,7 @@ serd_dep = dependency('serd-0',
sord_dep = dependency('sord-0',
version: '>= 0.16.0',
+ include_type: 'system',
fallback: ['sord', 'sord_dep'])
sratom_dep = dependency('sratom-0',
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 9e760805..8fe12c79 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -54,7 +54,6 @@ Configuration::Configuration(Forge& forge)
" ingen -g # Run GUI, connect to running engine\n"
" ingen -eg # Run engine and GUI in one process\n"
" ingen -eg foo.ingen # Run engine and GUI and load a graph")
- , _max_name_length(0)
{
add("atomicBundles", "atomic-bundles", 'a', "Execute bundles atomically", GLOBAL, forge.Bool, forge.make(false));
add("bufferSize", "buffer-size", 'b', "Buffer size in samples", GLOBAL, forge.Int, forge.make(1024));
diff --git a/src/LV2Features.cpp b/src/LV2Features.cpp
index ebce8780..65fe6f6b 100644
--- a/src/LV2Features.cpp
+++ b/src/LV2Features.cpp
@@ -37,12 +37,10 @@ LV2Features::add_feature(const std::shared_ptr<Feature>& feature)
}
LV2Features::FeatureArray::FeatureArray(FeatureVector& features)
- : _features(features)
+ : _features(features)
+ , _array{static_cast<LV2_Feature**>(
+ calloc(features.size() + 1, sizeof(LV2_Feature*)))}
{
- _array = static_cast<LV2_Feature**>(
- malloc(sizeof(LV2_Feature*) * (features.size() + 1)));
-
- _array[features.size()] = nullptr;
for (size_t i = 0; i < features.size(); ++i) {
_array[i] = features[i].get();
}
diff --git a/src/Log.cpp b/src/Log.cpp
index 55c2193a..23bbcf3f 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -33,8 +33,6 @@ namespace ingen {
Log::Log(LV2_Log_Log* log, URIs& uris)
: _log(log)
, _uris(uris)
- , _flush(false)
- , _trace(false)
{}
void
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp
index 1109c825..dde31018 100644
--- a/src/Serialiser.cpp
+++ b/src/Serialiser.cpp
@@ -57,9 +57,7 @@ struct Serialiser::Impl
{
explicit Impl(World& world)
: _root_path("/")
- , _mode(Mode::TO_FILE)
, _world(world)
- , _model(nullptr)
, _sratom(sratom_new(&_world.uri_map().urid_map()))
{
}
@@ -105,11 +103,11 @@ struct Serialiser::Impl
std::string finish();
raul::Path _root_path;
- Mode _mode;
+ Mode _mode{Mode::TO_FILE};
URI _base_uri;
FilePath _basename;
World& _world;
- Sord::Model* _model;
+ Sord::Model* _model{nullptr};
Sratom* _sratom;
};
diff --git a/src/SocketReader.cpp b/src/SocketReader.cpp
index 589fa666..d4b400bb 100644
--- a/src/SocketReader.cpp
+++ b/src/SocketReader.cpp
@@ -42,12 +42,7 @@ SocketReader::SocketReader(ingen::World& world,
std::shared_ptr<raul::Socket> sock)
: _world(world)
, _iface(iface)
- , _env()
- , _inserter(nullptr)
- , _msg_node(nullptr)
, _socket(std::move(sock))
- , _socket_error(0)
- , _exit_flag(false)
, _thread(&SocketReader::run, this)
{}
diff --git a/src/TurtleWriter.cpp b/src/TurtleWriter.cpp
index 686f0fe4..fceed7c2 100644
--- a/src/TurtleWriter.cpp
+++ b/src/TurtleWriter.cpp
@@ -41,20 +41,18 @@ write_prefix(void* handle, const SerdNode* name, const SerdNode* uri)
}
TurtleWriter::TurtleWriter(URIMap& map, URIs& uris, URI uri)
- : AtomWriter(map, uris, *this)
- , _map(map)
- , _sratom(sratom_new(&map.urid_map()))
- , _base(SERD_NODE_NULL)
- , _base_uri(SERD_URI_NULL)
- , _uri(std::move(uri))
- , _wrote_prefixes(false)
+ : AtomWriter{map, uris, *this}
+ , _map{map}
+ , _sratom{sratom_new(&map.urid_map())}
+ , _base{serd_node_from_string(SERD_URI, USTR("ingen:/"))}
+ , _env{serd_env_new(&_base)}
+ , _uri{std::move(uri)}
{
// Use <ingen:/> as base URI, so relative URIs are like bundle paths
- _base = serd_node_from_string(SERD_URI, USTR("ingen:/"));
+
serd_uri_parse(_base.buf, &_base_uri);
// Set up serialisation environment
- _env = serd_env_new(&_base);
serd_env_set_prefix_from_strings(_env, USTR("atom"), USTR("http://lv2plug.in/ns/ext/atom#"));
serd_env_set_prefix_from_strings(_env, USTR("doap"), USTR("http://usefulinc.com/ns/doap#"));
serd_env_set_prefix_from_strings(_env, USTR("ingen"), USTR(INGEN_NS));
@@ -67,6 +65,7 @@ TurtleWriter::TurtleWriter(URIMap& map, URIs& uris, URI uri)
serd_env_set_prefix_from_strings(_env, USTR("xsd"), USTR("http://www.w3.org/2001/XMLSchema#"));
// Make a Turtle writer that writes to text_sink
+ // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
_writer = serd_writer_new(
SERD_TURTLE,
static_cast<SerdStyle>(SERD_STYLE_RESOLVED|SERD_STYLE_ABBREVIATED|SERD_STYLE_CURIED),
diff --git a/src/World.cpp b/src/World.cpp
index b0ae635f..e2db1a57 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -90,9 +90,7 @@ class World::Impl
{
public:
Impl(LV2_URID_Map* map, LV2_URID_Unmap* unmap, LV2_Log_Log* log_feature)
- : argc(nullptr)
- , argv(nullptr)
- , lv2_features(nullptr)
+ : lv2_features(new LV2Features())
, rdf_world(new Sord::World())
, lilv_world(lilv_world_new(), lilv_world_free)
, uri_map(log, map, unmap)
@@ -101,7 +99,6 @@ public:
, conf(forge)
, log(log_feature, uris)
{
- lv2_features = new LV2Features();
lv2_features->add_feature(uri_map.urid_map_feature());
lv2_features->add_feature(uri_map.urid_unmap_feature());
lv2_features->add_feature(std::make_shared<InstanceAccess>());
@@ -187,8 +184,8 @@ public:
using LilvWorldUPtr =
std::unique_ptr<LilvWorld, decltype(&lilv_world_free)>;
- int* argc;
- char*** argv;
+ int* argc{nullptr};
+ char*** argv{nullptr};
LV2Features* lv2_features;
std::unique_ptr<Sord::World> rdf_world;
LilvWorldUPtr lilv_world;
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index f530f632..a6784928 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -44,7 +44,6 @@ PluginModel::PluginModel(URIs& uris,
const Properties& properties)
: Resource(uris, uri)
, _type(type)
- , _fetched(false)
{
if (!_type.is_valid()) {
if (uri.string().find("ingen-internals") != string::npos) {
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index 7292d8b2..c0778135 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -166,7 +166,6 @@ PluginUI::PluginUI(ingen::World& world,
const LilvNode* ui_type)
: _world(world)
, _block(std::move(block))
- , _instance(nullptr)
, _uis(uis)
, _ui(ui)
, _ui_node(lilv_node_duplicate(lilv_ui_get_uri(ui)))
diff --git a/src/gui/.clang-tidy b/src/gui/.clang-tidy
index 775b8cd7..065c97b1 100644
--- a/src/gui/.clang-tidy
+++ b/src/gui/.clang-tidy
@@ -3,7 +3,6 @@ Checks: >
-*-avoid-c-arrays,
-*-else-after-return,
-*-magic-numbers,
- -*-member-init,
-*-named-parameter,
-*-narrowing-conversions,
-*-non-private-member-variables-in-classes,
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 3187548a..20d8898f 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -83,15 +83,6 @@ App::App(ingen::World& world)
: _style(new Style(*this))
, _window_factory(new WindowFactory(*this))
, _world(world)
- , _sample_rate(48000)
- , _block_length(1024)
- , _n_threads(1)
- , _mean_run_load(0.0f)
- , _min_run_load(0.0f)
- , _max_run_load(0.0f)
- , _enable_signal(true)
- , _requested_plugins(false)
- , _is_plugin(false)
{
_world.conf().load_default("ingen", "gui.ttl");
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index c09d1cd5..032f5eb4 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -177,20 +177,20 @@ protected:
ingen::World& _world;
- int32_t _sample_rate;
- int32_t _block_length;
- int32_t _n_threads;
- float _mean_run_load;
- float _min_run_load;
- float _max_run_load;
+ int32_t _sample_rate{48000};
+ int32_t _block_length{1024};
+ int32_t _n_threads{1};
+ float _mean_run_load{0.0f};
+ float _min_run_load{0.0f};
+ float _max_run_load{0.0f};
std::string _status_text;
using ActivityPorts = std::unordered_map<Port*, bool>;
ActivityPorts _activity_ports;
- bool _enable_signal;
- bool _requested_plugins;
- bool _is_plugin;
+ bool _enable_signal{true};
+ bool _requested_plugins{false};
+ bool _is_plugin{false};
};
} // namespace gui
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 4e257d88..0cd2c5ad 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -37,7 +37,6 @@ using std::string;
BreadCrumbs::BreadCrumbs(App& app)
: _active_path("/")
, _full_path("/")
- , _enable_signal(true)
{
app.sig_client()->signal_message().connect(
sigc::mem_fun(this, &BreadCrumbs::message));
diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp
index d877d0c5..9ed6f04a 100644
--- a/src/gui/BreadCrumbs.hpp
+++ b/src/gui/BreadCrumbs.hpp
@@ -118,7 +118,7 @@ private:
raul::Path _active_path;
raul::Path _full_path;
- bool _enable_signal;
+ bool _enable_signal{true};
std::list<BreadCrumb*> _breadcrumbs;
};
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index ea1a6e27..a5e6fbd4 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -70,27 +70,6 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject,
Glib::RefPtr<Gtk::Builder> xml)
: Dialog(cobject)
, _xml(std::move(xml))
- , _icon(nullptr)
- , _progress_bar(nullptr)
- , _progress_label(nullptr)
- , _url_entry(nullptr)
- , _server_radio(nullptr)
- , _port_spinbutton(nullptr)
- , _launch_radio(nullptr)
- , _internal_radio(nullptr)
- , _activate_button(nullptr)
- , _deactivate_button(nullptr)
- , _disconnect_button(nullptr)
- , _connect_button(nullptr)
- , _quit_button(nullptr)
- , _mode(Mode::CONNECT_REMOTE)
- , _connect_uri("unix:///tmp/ingen.sock")
- , _ping_id(-1)
- , _attached(false)
- , _finished_connecting(false)
- , _widgets_loaded(false)
- , _connect_stage(0)
- , _quit_flag(false)
{
}
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 6fc4dbfb..b0e03850 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -100,28 +100,28 @@ private:
const Glib::RefPtr<Gtk::Builder> _xml;
- Gtk::Image* _icon;
- Gtk::ProgressBar* _progress_bar;
- Gtk::Label* _progress_label;
- Gtk::Entry* _url_entry;
- Gtk::RadioButton* _server_radio;
- Gtk::SpinButton* _port_spinbutton;
- Gtk::RadioButton* _launch_radio;
- Gtk::RadioButton* _internal_radio;
- Gtk::Button* _activate_button;
- Gtk::Button* _deactivate_button;
- Gtk::Button* _disconnect_button;
- Gtk::Button* _connect_button;
- Gtk::Button* _quit_button;
-
- Mode _mode;
- URI _connect_uri;
- int32_t _ping_id;
- bool _attached;
- bool _finished_connecting;
- bool _widgets_loaded;
- int _connect_stage;
- bool _quit_flag;
+ Gtk::Image* _icon{nullptr};
+ Gtk::ProgressBar* _progress_bar{nullptr};
+ Gtk::Label* _progress_label{nullptr};
+ Gtk::Entry* _url_entry{nullptr};
+ Gtk::RadioButton* _server_radio{nullptr};
+ Gtk::SpinButton* _port_spinbutton{nullptr};
+ Gtk::RadioButton* _launch_radio{nullptr};
+ Gtk::RadioButton* _internal_radio{nullptr};
+ Gtk::Button* _activate_button{nullptr};
+ Gtk::Button* _deactivate_button{nullptr};
+ Gtk::Button* _disconnect_button{nullptr};
+ Gtk::Button* _connect_button{nullptr};
+ Gtk::Button* _quit_button{nullptr};
+
+ Mode _mode{Mode::CONNECT_REMOTE};
+ URI _connect_uri{"unix:///tmp/ingen.sock"};
+ int32_t _ping_id{-1};
+ bool _attached{false};
+ bool _finished_connecting{false};
+ bool _widgets_loaded{false};
+ int _connect_stage{0};
+ bool _quit_flag{false};
};
} // namespace gui
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 6b62e0de..636a3d9f 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -129,10 +129,6 @@ GraphCanvas::GraphCanvas(App& app,
: Canvas(width, height)
, _app(app)
, _graph(std::move(graph))
- , _auto_position_count(0)
- , _menu_x(0)
- , _menu_y(0)
- , _paste_count(0)
{
Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("canvas_menu");
xml->get_widget("canvas_menu", _menu);
diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp
index b1e60aa3..3ebd61df 100644
--- a/src/gui/GraphCanvas.hpp
+++ b/src/gui/GraphCanvas.hpp
@@ -141,12 +141,12 @@ private:
using Views = std::map<std::shared_ptr<const client::ObjectModel>, Ganv::Module*>;
Views _views;
- int _auto_position_count;
+ int _auto_position_count{0};
std::pair<int, int> _auto_position_scroll_offsets;
- int _menu_x;
- int _menu_y;
- int _paste_count;
+ int _menu_x{0};
+ int _menu_y{0};
+ int _paste_count{0};
// Track pasted objects so they can be selected when they arrive
std::set<raul::Path> _pastees;
diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp
index 3206f80b..a7e60444 100644
--- a/src/gui/GraphPortModule.cpp
+++ b/src/gui/GraphPortModule.cpp
@@ -50,7 +50,6 @@ GraphPortModule::GraphPortModule(
const std::shared_ptr<const client::PortModel>& model)
: Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords?
, _model(model)
- , _port(nullptr)
{
assert(model);
diff --git a/src/gui/GraphPortModule.hpp b/src/gui/GraphPortModule.hpp
index 5ce7ea57..b02f63a1 100644
--- a/src/gui/GraphPortModule.hpp
+++ b/src/gui/GraphPortModule.hpp
@@ -76,7 +76,7 @@ protected:
void property_changed(const URI& key, const Atom& value);
std::shared_ptr<const client::PortModel> _model;
- Port* _port;
+ Port* _port{nullptr};
};
} // namespace gui
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp
index 98b90ff0..7a787cb3 100644
--- a/src/gui/GraphTreeWindow.cpp
+++ b/src/gui/GraphTreeWindow.cpp
@@ -56,8 +56,6 @@ namespace gui {
GraphTreeWindow::GraphTreeWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Window(cobject)
- , _graphs_treeview(nullptr)
- , _enable_signal(true)
{
xml->get_widget_derived("graphs_treeview", _graphs_treeview);
diff --git a/src/gui/GraphTreeWindow.hpp b/src/gui/GraphTreeWindow.hpp
index 1a719a81..7c2a67b9 100644
--- a/src/gui/GraphTreeWindow.hpp
+++ b/src/gui/GraphTreeWindow.hpp
@@ -87,7 +87,7 @@ protected:
find_graph(Gtk::TreeModel::Children root,
const std::shared_ptr<client::ObjectModel>& graph);
- GraphTreeView* _graphs_treeview;
+ GraphTreeView* _graphs_treeview{nullptr};
struct GraphTreeModelColumns : public Gtk::TreeModel::ColumnRecord
{
@@ -105,7 +105,7 @@ protected:
GraphTreeModelColumns _graph_tree_columns;
Glib::RefPtr<Gtk::TreeStore> _graph_treestore;
Glib::RefPtr<Gtk::TreeSelection> _graph_tree_selection;
- bool _enable_signal;
+ bool _enable_signal{true};
};
/** Derived TreeView class to support context menus for graphs */
@@ -115,7 +115,6 @@ public:
GraphTreeView(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::TreeView(cobject)
- , _window(nullptr)
{}
void set_window(GraphTreeWindow* win) { _window = win; }
@@ -131,7 +130,7 @@ public:
}
private:
- GraphTreeWindow* _window;
+ GraphTreeWindow* _window{nullptr};
};
} // namespace gui
diff --git a/src/gui/GraphWindow.cpp b/src/gui/GraphWindow.cpp
index 38273a8e..94df34e0 100644
--- a/src/gui/GraphWindow.cpp
+++ b/src/gui/GraphWindow.cpp
@@ -32,10 +32,6 @@ namespace gui {
GraphWindow::GraphWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Window(cobject)
- , _box(nullptr)
- , _position_stored(false)
- , _x(0)
- , _y(0)
{
property_visible() = false;
diff --git a/src/gui/GraphWindow.hpp b/src/gui/GraphWindow.hpp
index 290e0e00..d1361ca5 100644
--- a/src/gui/GraphWindow.hpp
+++ b/src/gui/GraphWindow.hpp
@@ -85,10 +85,10 @@ protected:
bool on_key_press_event(GdkEventKey* event) override;
private:
- GraphBox* _box;
- bool _position_stored;
- int _x;
- int _y;
+ GraphBox* _box{nullptr};
+ bool _position_stored{false};
+ int _x{0};
+ int _y{0};
};
} // namespace gui
diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp
index ab82193d..45301889 100644
--- a/src/gui/MessagesWindow.hpp
+++ b/src/gui/MessagesWindow.hpp
@@ -67,9 +67,9 @@ private:
std::mutex _mutex;
std::stringstream _stream;
- Gtk::TextView* _textview;
- Gtk::Button* _clear_button;
- Gtk::Button* _close_button;
+ Gtk::TextView* _textview{nullptr};
+ Gtk::Button* _clear_button{nullptr};
+ Gtk::Button* _close_button{nullptr};
Glib::RefPtr<Gtk::TextTag> _error_tag;
std::map< LV2_URID, Glib::RefPtr<Gtk::TextTag> > _tags;
diff --git a/src/gui/NewSubgraphWindow.hpp b/src/gui/NewSubgraphWindow.hpp
index 9897e6c2..a3f9c713 100644
--- a/src/gui/NewSubgraphWindow.hpp
+++ b/src/gui/NewSubgraphWindow.hpp
@@ -68,11 +68,11 @@ private:
Properties _initial_data;
std::shared_ptr<const client::GraphModel> _graph;
- Gtk::Entry* _name_entry;
- Gtk::Label* _message_label;
- Gtk::SpinButton* _poly_spinbutton;
- Gtk::Button* _ok_button;
- Gtk::Button* _cancel_button;
+ Gtk::Entry* _name_entry{nullptr};
+ Gtk::Label* _message_label{nullptr};
+ Gtk::SpinButton* _poly_spinbutton{nullptr};
+ Gtk::Button* _ok_button{nullptr};
+ Gtk::Button* _cancel_button{nullptr};
};
} // namespace gui
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 517d0018..faddaae7 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -68,7 +68,6 @@ namespace gui {
NodeMenu::NodeMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: ObjectMenu(cobject, xml)
- , _presets_menu(nullptr)
{
xml->get_widget("node_popup_gui_menuitem", _popup_gui_menuitem);
xml->get_widget("node_embed_gui_menuitem", _embed_gui_menuitem);
diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp
index 8a1e5f06..f109c3e4 100644
--- a/src/gui/NodeMenu.hpp
+++ b/src/gui/NodeMenu.hpp
@@ -79,11 +79,11 @@ protected:
void on_save_preset_activated();
void on_preset_activated(const std::string& uri);
- Gtk::MenuItem* _popup_gui_menuitem;
- Gtk::CheckMenuItem* _embed_gui_menuitem;
- Gtk::CheckMenuItem* _enabled_menuitem;
- Gtk::MenuItem* _randomize_menuitem;
- Gtk::Menu* _presets_menu;
+ Gtk::MenuItem* _popup_gui_menuitem{nullptr};
+ Gtk::CheckMenuItem* _embed_gui_menuitem{nullptr};
+ Gtk::CheckMenuItem* _enabled_menuitem{nullptr};
+ Gtk::MenuItem* _randomize_menuitem{nullptr};
+ Gtk::Menu* _presets_menu{nullptr};
sigc::connection _preset_connection;
};
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 1dbd1cd9..c80947cb 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -78,9 +78,6 @@ NodeModule::NodeModule(GraphCanvas& canvas,
const std::shared_ptr<const BlockModel>& block)
: Ganv::Module(canvas, block->path().symbol(), 0, 0, true)
, _block(block)
- , _gui_widget(nullptr)
- , _gui_window(nullptr)
- , _initialised(false)
{
block->signal_new_port().connect(
sigc::mem_fun(this, &NodeModule::new_port_view));
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp
index 1ca7955c..f94a10e9 100644
--- a/src/gui/NodeModule.hpp
+++ b/src/gui/NodeModule.hpp
@@ -106,11 +106,11 @@ protected:
bool show_menu(GdkEventButton* ev);
std::shared_ptr<const client::BlockModel> _block;
- NodeMenu* _menu;
+ NodeMenu* _menu{nullptr};
std::shared_ptr<client::PluginUI> _plugin_ui;
- Gtk::Widget* _gui_widget;
- Gtk::Window* _gui_window; ///< iff popped up
- bool _initialised;
+ Gtk::Widget* _gui_widget{nullptr};
+ Gtk::Window* _gui_window{nullptr}; ///< iff popped up
+ bool _initialised{false};
};
} // namespace gui
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index 5f78144f..87f6f9e9 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -45,13 +45,6 @@ namespace gui {
ObjectMenu::ObjectMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::Menu(cobject)
- , _app(nullptr)
- , _polyphonic_menuitem(nullptr)
- , _disconnect_menuitem(nullptr)
- , _rename_menuitem(nullptr)
- , _destroy_menuitem(nullptr)
- , _properties_menuitem(nullptr)
- , _enable_signal(false)
{
xml->get_widget("object_learn_menuitem", _learn_menuitem);
xml->get_widget("object_unlearn_menuitem", _unlearn_menuitem);
diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp
index 214c8307..de105364 100644
--- a/src/gui/ObjectMenu.hpp
+++ b/src/gui/ObjectMenu.hpp
@@ -76,18 +76,18 @@ protected:
void property_changed(const URI& predicate, const Atom& value);
- App* _app;
+ App* _app{nullptr};
std::shared_ptr<const client::ObjectModel> _object;
- Gtk::MenuItem* _learn_menuitem;
- Gtk::MenuItem* _unlearn_menuitem;
- Gtk::CheckMenuItem* _polyphonic_menuitem;
- Gtk::MenuItem* _disconnect_menuitem;
- Gtk::MenuItem* _rename_menuitem;
- Gtk::MenuItem* _destroy_menuitem;
- Gtk::MenuItem* _properties_menuitem;
- Gtk::SeparatorMenuItem* _separator_menuitem;
-
- bool _enable_signal;
+ Gtk::MenuItem* _learn_menuitem{nullptr};
+ Gtk::MenuItem* _unlearn_menuitem{nullptr};
+ Gtk::CheckMenuItem* _polyphonic_menuitem{nullptr};
+ Gtk::MenuItem* _disconnect_menuitem{nullptr};
+ Gtk::MenuItem* _rename_menuitem{nullptr};
+ Gtk::MenuItem* _destroy_menuitem{nullptr};
+ Gtk::MenuItem* _properties_menuitem{nullptr};
+ Gtk::SeparatorMenuItem* _separator_menuitem{nullptr};
+
+ bool _enable_signal{false};
};
} // namespace gui
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 652ac05d..500c48d1 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -55,7 +55,6 @@ namespace gui {
PortMenu::PortMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: ObjectMenu(cobject, xml)
- , _internal_graph_port(false)
{
xml->get_widget("object_menu", _port_menu);
xml->get_widget("port_set_min_menuitem", _set_min_menuitem);
diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp
index 75a25cde..71a5f48b 100644
--- a/src/gui/PortMenu.hpp
+++ b/src/gui/PortMenu.hpp
@@ -63,14 +63,14 @@ private:
void on_menu_reset_range();
void on_menu_expose();
- Gtk::Menu* _port_menu;
- Gtk::MenuItem* _set_min_menuitem;
- Gtk::MenuItem* _set_max_menuitem;
- Gtk::MenuItem* _reset_range_menuitem;
- Gtk::MenuItem* _expose_menuitem;
+ Gtk::Menu* _port_menu{nullptr};
+ Gtk::MenuItem* _set_min_menuitem{nullptr};
+ Gtk::MenuItem* _set_max_menuitem{nullptr};
+ Gtk::MenuItem* _reset_range_menuitem{nullptr};
+ Gtk::MenuItem* _expose_menuitem{nullptr};
/// True iff this is a (flipped) port on a GraphPortModule in its graph
- bool _internal_graph_port;
+ bool _internal_graph_port{false};
};
} // namespace gui
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index cd2a6bd1..3390c53e 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -76,7 +76,6 @@ using URISet = std::set<URI>;
PropertiesWindow::PropertiesWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Window(cobject)
- , _value_type(0)
{
xml->get_widget("properties_vbox", _vbox);
xml->get_widget("properties_scrolledwindow", _scrolledwindow);
diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp
index 780c2ba1..e51b1ac6 100644
--- a/src/gui/PropertiesWindow.hpp
+++ b/src/gui/PropertiesWindow.hpp
@@ -129,16 +129,16 @@ private:
Glib::RefPtr<Gtk::ListStore> _key_store;
sigc::connection _property_connection;
sigc::connection _property_removed_connection;
- Gtk::VBox* _vbox;
- Gtk::ScrolledWindow* _scrolledwindow;
- Gtk::Table* _table;
- Gtk::ComboBox* _key_combo;
- LV2_URID _value_type;
- Gtk::Bin* _value_bin;
- Gtk::Button* _add_button;
- Gtk::Button* _cancel_button;
- Gtk::Button* _apply_button;
- Gtk::Button* _ok_button;
+ Gtk::VBox* _vbox{nullptr};
+ Gtk::ScrolledWindow* _scrolledwindow{nullptr};
+ Gtk::Table* _table{nullptr};
+ Gtk::ComboBox* _key_combo{nullptr};
+ LV2_URID _value_type{0};
+ Gtk::Bin* _value_bin{nullptr};
+ Gtk::Button* _add_button{nullptr};
+ Gtk::Button* _cancel_button{nullptr};
+ Gtk::Button* _apply_button{nullptr};
+ Gtk::Button* _ok_button{nullptr};
};
} // namespace gui
diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp
index 004ca784..42db3ff6 100644
--- a/src/gui/RenameWindow.hpp
+++ b/src/gui/RenameWindow.hpp
@@ -63,11 +63,11 @@ private:
std::shared_ptr<const client::ObjectModel> _object;
- Gtk::Entry* _symbol_entry;
- Gtk::Entry* _label_entry;
- Gtk::Label* _message_label;
- Gtk::Button* _cancel_button;
- Gtk::Button* _ok_button;
+ Gtk::Entry* _symbol_entry{nullptr};
+ Gtk::Entry* _label_entry{nullptr};
+ Gtk::Label* _message_label{nullptr};
+ Gtk::Button* _cancel_button{nullptr};
+ Gtk::Button* _ok_button{nullptr};
};
} // namespace gui
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp
index 5be83688..7b9e4dc7 100644
--- a/src/gui/Style.cpp
+++ b/src/gui/Style.cpp
@@ -27,22 +27,15 @@ namespace ingen {
namespace gui {
Style::Style(App& app)
- // Colours from the Tango palette with modified V
- : _app(app)
+ : _app(app)
+{
#ifdef INGEN_USE_LIGHT_THEME
- , _audio_port_color(0xC8E6ABFF) // Green
- , _control_port_color(0xAAC0E6FF) // Blue
- , _cv_port_color(0xACE6E0FF) // Teal (between audio and control)
- , _event_port_color(0xE6ABABFF) // Red
- , _string_port_color(0xD8ABE6FF) // Plum
-#else
- , _audio_port_color(0x4A8A0EFF) // Green
- , _control_port_color(0x244678FF) // Blue
- , _cv_port_color(0x248780FF) // Teal (between audio and control)
- , _event_port_color(0x960909FF) // Red
- , _string_port_color(0x5C3566FF) // Plum
+ _audio_port_color = 0xC8E6ABFF;
+ _control_port_color = 0xAAC0E6FF;
+ _cv_port_color = 0xACE6E0FF;
+ _event_port_color = 0xE6ABABFF;
+ _string_port_color = 0xD8ABE6FF;
#endif
-{
}
/** Loads settings from the rc file. Passing no parameter will load from
diff --git a/src/gui/Style.hpp b/src/gui/Style.hpp
index bc94d64a..20d560a8 100644
--- a/src/gui/Style.hpp
+++ b/src/gui/Style.hpp
@@ -45,11 +45,12 @@ public:
private:
App& _app;
- uint32_t _audio_port_color;
- uint32_t _control_port_color;
- uint32_t _cv_port_color;
- uint32_t _event_port_color;
- uint32_t _string_port_color;
+ // Colours from the Tango palette with modified V
+ uint32_t _audio_port_color{0x4A8A0EFF}; // Green
+ uint32_t _control_port_color{0x244678FF}; // Blue
+ uint32_t _cv_port_color{0x248780FF}; // Teal {between audio/control}
+ uint32_t _event_port_color{0x960909FF}; // Red
+ uint32_t _string_port_color{0x5C3566FF}; // Plum
};
} // namespace gui
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 663529da..7c5fdd99 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -49,9 +49,7 @@ namespace gui {
ThreadedLoader::ThreadedLoader(App& app, std::shared_ptr<Interface> engine)
: _app(app)
- , _sem(0)
, _engine(std::move(engine))
- , _exit_flag(false)
, _thread(&ThreadedLoader::run, this)
{
if (!parser()) {
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index 5e9392bc..6466fb1d 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -95,11 +95,11 @@ private:
void run();
App& _app;
- raul::Semaphore _sem;
+ raul::Semaphore _sem{0};
std::shared_ptr<Interface> _engine;
std::mutex _mutex;
std::list<Closure> _events;
- bool _exit_flag;
+ bool _exit_flag{false};
std::thread _thread;
};
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index b4117b08..973a236b 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -52,11 +52,6 @@ namespace gui {
WindowFactory::WindowFactory(App& app)
: _app(app)
- , _main_box(nullptr)
- , _load_plugin_win(nullptr)
- , _load_graph_win(nullptr)
- , _new_subgraph_win(nullptr)
- , _properties_win(nullptr)
{
WidgetFactory::get_widget_derived("load_plugin_win", _load_plugin_win);
WidgetFactory::get_widget_derived("load_graph_win", _load_graph_win);
diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp
index a93bb89f..d4fe8d22 100644
--- a/src/gui/WindowFactory.hpp
+++ b/src/gui/WindowFactory.hpp
@@ -107,13 +107,13 @@ private:
const std::shared_ptr<GraphView>& view);
App& _app;
- GraphBox* _main_box;
+ GraphBox* _main_box{nullptr};
GraphWindowMap _graph_windows;
- LoadPluginWindow* _load_plugin_win;
- LoadGraphWindow* _load_graph_win;
- NewSubgraphWindow* _new_subgraph_win;
- PropertiesWindow* _properties_win;
- RenameWindow* _rename_win;
+ LoadPluginWindow* _load_plugin_win{nullptr};
+ LoadGraphWindow* _load_graph_win{nullptr};
+ NewSubgraphWindow* _new_subgraph_win{nullptr};
+ PropertiesWindow* _properties_win{nullptr};
+ RenameWindow* _rename_win{nullptr};
};
} // namespace gui
diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp
index ffa50779..d80d92c0 100644
--- a/src/gui/ingen_gui_lv2.cpp
+++ b/src/gui/ingen_gui_lv2.cpp
@@ -73,19 +73,13 @@ struct IngenLV2AtomSink : public AtomSink {
};
struct IngenLV2UI {
- IngenLV2UI()
- : argc(0)
- , argv(nullptr)
- , forge(nullptr)
- , world(nullptr)
- , sink(nullptr)
- {}
+ IngenLV2UI() = default;
- int argc;
- char** argv;
- Forge* forge;
- World* world;
- IngenLV2AtomSink* sink;
+ int argc{0};
+ char** argv{nullptr};
+ Forge* forge{nullptr};
+ World* world{nullptr};
+ IngenLV2AtomSink* sink{nullptr};
std::shared_ptr<gui::App> app;
std::shared_ptr<gui::GraphBox> view;
std::shared_ptr<Interface> engine;
diff --git a/src/server/.clang-tidy b/src/server/.clang-tidy
index b309c823..d0448c00 100644
--- a/src/server/.clang-tidy
+++ b/src/server/.clang-tidy
@@ -27,7 +27,6 @@ Checks: >
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
- -cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
@@ -57,14 +56,12 @@ Checks: >
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-return-braced-init-list,
- -modernize-use-default-member-init,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-portability-simd-intrinsics,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-implicit-bool-conversion,
- -readability-redundant-member-init,
-readability-use-anyofallof,
CheckOptions:
- key: modernize-use-override.AllowOverrideAndFinal
diff --git a/src/server/BlockFactory.cpp b/src/server/BlockFactory.cpp
index 2186b779..1d88568a 100644
--- a/src/server/BlockFactory.cpp
+++ b/src/server/BlockFactory.cpp
@@ -45,7 +45,6 @@ namespace server {
BlockFactory::BlockFactory(ingen::World& world)
: _world(world)
- , _has_loaded(false)
{
load_internal_plugins();
}
diff --git a/src/server/BlockFactory.hpp b/src/server/BlockFactory.hpp
index 7cf28325..17c11bb4 100644
--- a/src/server/BlockFactory.hpp
+++ b/src/server/BlockFactory.hpp
@@ -62,7 +62,7 @@ private:
Plugins _plugins;
ingen::World& _world;
- bool _has_loaded;
+ bool _has_loaded{false};
};
} // namespace server
diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp
index 26e83eb8..a89df669 100644
--- a/src/server/BlockImpl.cpp
+++ b/src/server/BlockImpl.cpp
@@ -43,10 +43,7 @@ BlockImpl::BlockImpl(PluginImpl* plugin,
: NodeImpl(plugin->uris(), parent, symbol)
, _plugin(plugin)
, _polyphony((polyphonic && parent) ? parent->internal_poly() : 1)
- , _mark(Mark::UNVISITED)
, _polyphonic(polyphonic)
- , _activated(false)
- , _enabled(true)
{
assert(_plugin);
assert(_polyphony > 0);
diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp
index c285bdac..448ebb99 100644
--- a/src/server/BlockImpl.hpp
+++ b/src/server/BlockImpl.hpp
@@ -208,10 +208,10 @@ protected:
uint32_t _polyphony;
std::set<BlockImpl*> _providers; ///< Blocks connected to this one's input ports
std::set<BlockImpl*> _dependants; ///< Blocks this one's output ports are connected to
- Mark _mark; ///< Mark for graph compilation algorithm
+ Mark _mark{Mark::UNVISITED}; ///< Mark for graph walks
bool _polyphonic;
- bool _activated;
- bool _enabled;
+ bool _activated{false};
+ bool _enabled{true};
};
} // namespace server
diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp
index 7e14c354..18483d2d 100644
--- a/src/server/Buffer.cpp
+++ b/src/server/Buffer.cpp
@@ -48,13 +48,10 @@ Buffer::Buffer(BufferFactory& bufs,
bool external,
void*)
: _factory(bufs)
- , _next(nullptr)
, _buf(external ? nullptr : aligned_alloc(capacity))
- , _latest_event(0)
, _type(type)
, _value_type(value_type)
, _capacity(capacity)
- , _refs(0)
, _external(external)
{
if (!external && !_buf) {
diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp
index e1ff2cf9..b1d8fb4d 100644
--- a/src/server/Buffer.hpp
+++ b/src/server/Buffer.hpp
@@ -229,15 +229,15 @@ private:
BufferFactory& _factory;
// NOLINTNEXTLINE(clang-analyzer-webkit.NoUncountedMemberChecker)
- Buffer* _next; ///< Intrusive linked list for BufferFactory
+ Buffer* _next{nullptr}; ///< Intrusive linked list for BufferFactory
void* _buf; ///< Actual buffer memory
BufferRef _value_buffer; ///< Value buffer for numeric sequences
- int64_t _latest_event;
+ int64_t _latest_event{0};
LV2_URID _type;
LV2_URID _value_type;
uint32_t _capacity;
- std::atomic<unsigned> _refs; ///< Intrusive reference count
+ std::atomic<unsigned> _refs{0}; ///< Intrusive reference count
bool _external; ///< Buffer is externally allocated
};
diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp
index 4ecdfc3b..97a9b933 100644
--- a/src/server/BufferFactory.cpp
+++ b/src/server/BufferFactory.cpp
@@ -38,7 +38,6 @@ BufferFactory::BufferFactory(Engine& engine, URIs& uris)
, _free_object(nullptr)
, _engine(engine)
, _uris(uris)
- , _seq_size(0)
, _silent_buffer(nullptr)
{
}
diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp
index 5909754b..5f649e4a 100644
--- a/src/server/BufferFactory.hpp
+++ b/src/server/BufferFactory.hpp
@@ -96,15 +96,15 @@ private:
static void free_list(Buffer* head);
- std::atomic<Buffer*> _free_audio;
- std::atomic<Buffer*> _free_control;
- std::atomic<Buffer*> _free_sequence;
- std::atomic<Buffer*> _free_object;
+ std::atomic<Buffer*> _free_audio{nullptr};
+ std::atomic<Buffer*> _free_control{nullptr};
+ std::atomic<Buffer*> _free_sequence{nullptr};
+ std::atomic<Buffer*> _free_object{nullptr};
std::mutex _mutex;
Engine& _engine;
URIs& _uris;
- uint32_t _seq_size;
+ uint32_t _seq_size{0};
BufferRef _silent_buffer;
};
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 5817bf6b..613def62 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -98,14 +98,8 @@ Engine::Engine(ingen::World& world)
, _interface(_event_writer)
, _atom_interface(
new AtomReader(world.uri_map(), world.uris(), world.log(), *_interface))
- , _root_graph(nullptr)
- , _cycle_start_time(0)
, _rand_engine(reinterpret_cast<uintptr_t>(this))
- , _uniform_dist(0.0f, 1.0f)
- , _quit_flag(false)
- , _reset_load_flag(false)
, _atomic_bundles(world.conf().option("atomic-bundles").get<int32_t>())
- , _activated(false)
{
if (!world.store()) {
world.set_store(std::make_shared<ingen::Store>());
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index 711e0bed..07f4c9a3 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -199,24 +199,24 @@ private:
std::shared_ptr<EventWriter> _event_writer;
std::shared_ptr<Interface> _interface;
std::unique_ptr<AtomReader> _atom_interface;
- GraphImpl* _root_graph;
+ GraphImpl* _root_graph{nullptr};
std::vector<std::unique_ptr<raul::RingBuffer>> _notifications;
std::vector<std::unique_ptr<RunContext>> _run_contexts;
- uint64_t _cycle_start_time;
+ uint64_t _cycle_start_time{0};
Load _run_load;
Clock _clock;
std::mt19937 _rand_engine;
- std::uniform_real_distribution<float> _uniform_dist;
+ std::uniform_real_distribution<float> _uniform_dist{0.0f, 1.0f};
std::condition_variable _tasks_available;
std::mutex _tasks_mutex;
- bool _quit_flag;
- bool _reset_load_flag;
+ bool _quit_flag{false};
+ bool _reset_load_flag{false};
bool _atomic_bundles;
- bool _activated;
+ bool _activated{false};
};
} // namespace server
diff --git a/src/server/EnginePort.hpp b/src/server/EnginePort.hpp
index ecfe59b3..d6e67f1e 100644
--- a/src/server/EnginePort.hpp
+++ b/src/server/EnginePort.hpp
@@ -40,9 +40,6 @@ class EnginePort : public raul::Noncopyable
public:
explicit EnginePort(DuplexPort* port)
: _graph_port(port)
- , _buffer(nullptr)
- , _handle(nullptr)
- , _driver_index(0)
{}
void set_buffer(void* buf) { _buffer = buf; }
@@ -57,9 +54,9 @@ public:
protected:
DuplexPort* _graph_port;
- void* _buffer;
- void* _handle;
- uint32_t _driver_index;
+ void* _buffer{nullptr};
+ void* _handle{nullptr};
+ uint32_t _driver_index{0};
};
} // namespace server
diff --git a/src/server/EventWriter.cpp b/src/server/EventWriter.cpp
index 9001b01a..8aeb5d83 100644
--- a/src/server/EventWriter.cpp
+++ b/src/server/EventWriter.cpp
@@ -36,7 +36,6 @@ namespace server {
EventWriter::EventWriter(Engine& engine)
: _engine(engine)
- , _event_mode(Event::Mode::NORMAL)
{
}
diff --git a/src/server/EventWriter.hpp b/src/server/EventWriter.hpp
index 437f65a5..a71242c1 100644
--- a/src/server/EventWriter.hpp
+++ b/src/server/EventWriter.hpp
@@ -74,7 +74,7 @@ public:
protected:
Engine& _engine;
std::shared_ptr<Interface> _respondee;
- Event::Mode _event_mode;
+ Event::Mode _event_mode{Event::Mode::NORMAL};
private:
SampleCount now() const;
diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp
index a668312d..7f566041 100644
--- a/src/server/GraphImpl.cpp
+++ b/src/server/GraphImpl.cpp
@@ -61,7 +61,6 @@ GraphImpl::GraphImpl(Engine& engine,
, _engine(engine)
, _poly_pre(internal_poly)
, _poly_process(internal_poly)
- , _process(false)
{
assert(internal_poly >= 1);
assert(internal_poly <= 128);
diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp
index 8911efb6..185b858c 100644
--- a/src/server/GraphImpl.hpp
+++ b/src/server/GraphImpl.hpp
@@ -211,7 +211,7 @@ private:
PortList _inputs; ///< Pre-process thread only
PortList _outputs; ///< Pre-process thread only
Blocks _blocks; ///< Pre-process thread only
- bool _process; ///< True iff graph is enabled
+ bool _process{false}; ///< True iff graph is enabled
};
} // namespace server
diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp
index 10a525cc..8547dc35 100644
--- a/src/server/InputPort.cpp
+++ b/src/server/InputPort.cpp
@@ -50,7 +50,6 @@ InputPort::InputPort(BufferFactory& bufs,
const Atom& value,
size_t buffer_size)
: PortImpl(bufs, parent, symbol, index, poly, type, buffer_type, value, buffer_size, false)
- , _num_arcs(0)
{
const ingen::URIs& uris = bufs.uris();
diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp
index 9357c3ff..3c94d5c6 100644
--- a/src/server/InputPort.hpp
+++ b/src/server/InputPort.hpp
@@ -136,8 +136,8 @@ protected:
uint32_t poly,
size_t num_in_arcs) const override;
- size_t _num_arcs; ///< Pre-process thread
- Arcs _arcs; ///< Audio thread
+ size_t _num_arcs{0}; ///< Pre-process thread
+ Arcs _arcs; ///< Audio thread
};
} // namespace server
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 69b84fb3..472379f9 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -61,22 +61,10 @@ namespace ingen {
namespace server {
JackDriver::JackDriver(Engine& engine)
- : _engine(engine)
- , _forge()
- , _sem(0)
- , _flag(false)
- , _client(nullptr)
- , _block_length(0)
- , _seq_size(0)
- , _sample_rate(0)
- , _is_activated(false)
- , _position()
- , _transport_state()
- , _old_bpm(120.0)
- , _old_frame(0)
- , _old_rolling(false)
+ : _engine(engine)
+ , _forge()
+ , _midi_event_type(_engine.world().uris().midi_MidiEvent)
{
- _midi_event_type = _engine.world().uris().midi_MidiEvent;
lv2_atom_forge_init(&_forge, &engine.world().uri_map().urid_map());
}
diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp
index d4ea03d0..49158e10 100644
--- a/src/server/JackDriver.hpp
+++ b/src/server/JackDriver.hpp
@@ -154,19 +154,19 @@ protected:
Ports _ports;
AudioBufPtr _fallback_buffer;
LV2_Atom_Forge _forge;
- raul::Semaphore _sem;
- std::atomic<bool> _flag;
- jack_client_t* _client;
- jack_nframes_t _block_length;
- size_t _seq_size;
- jack_nframes_t _sample_rate;
+ raul::Semaphore _sem{0};
+ std::atomic<bool> _flag{false};
+ jack_client_t* _client{nullptr};
+ jack_nframes_t _block_length{0};
+ size_t _seq_size{0};
+ jack_nframes_t _sample_rate{0};
uint32_t _midi_event_type;
- bool _is_activated;
- jack_position_t _position;
- jack_transport_state_t _transport_state;
- double _old_bpm;
- jack_nframes_t _old_frame;
- bool _old_rolling;
+ bool _is_activated{false};
+ jack_position_t _position{};
+ jack_transport_state_t _transport_state{};
+ double _old_bpm{120.0};
+ jack_nframes_t _old_frame{0};
+ bool _old_rolling{false};
};
} // namespace server
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index eb2ed346..a0e67eb9 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -70,7 +70,6 @@ LV2Block::LV2Block(LV2Plugin* plugin,
SampleRate srate)
: BlockImpl(plugin, symbol, polyphonic, parent, srate)
, _lv2_plugin(plugin)
- , _worker_iface(nullptr)
{
assert(_lv2_plugin);
}
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index 77270234..ec0b863b 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -179,7 +179,7 @@ protected:
LV2Plugin* _lv2_plugin;
raul::managed_ptr<Instances> _instances;
raul::managed_ptr<Instances> _prepared_instances;
- const LV2_Worker_Interface* _worker_iface;
+ const LV2_Worker_Interface* _worker_iface{nullptr};
std::mutex _work_mutex;
Responses _responses;
std::shared_ptr<LV2Features::FeatureArray> _features;
diff --git a/src/server/PluginImpl.hpp b/src/server/PluginImpl.hpp
index 3d7d596f..6164d77f 100644
--- a/src/server/PluginImpl.hpp
+++ b/src/server/PluginImpl.hpp
@@ -48,8 +48,6 @@ public:
PluginImpl(ingen::URIs& uris, const Atom& type, const URI& uri)
: Resource(uris, uri)
, _type(type)
- , _presets_loaded(false)
- , _is_zombie(false)
{
}
@@ -90,8 +88,8 @@ public:
protected:
Atom _type;
Presets _presets;
- bool _presets_loaded;
- bool _is_zombie;
+ bool _presets_loaded{false};
+ bool _is_zombie{false};
};
} // namespace server
diff --git a/src/server/PortAudioDriver.cpp b/src/server/PortAudioDriver.cpp
index fcb9cf67..68acf552 100644
--- a/src/server/PortAudioDriver.cpp
+++ b/src/server/PortAudioDriver.cpp
@@ -47,15 +47,7 @@ PortAudioDriver::PortAudioDriver(Engine& engine)
: _engine(engine)
, _inputParameters()
, _outputParameters()
- , _sem(0)
- , _stream(nullptr)
- , _seq_size(4096)
, _block_length(engine.world().conf().option("buffer-size").get<int32_t>())
- , _sample_rate(48000)
- , _n_inputs(0)
- , _n_outputs(0)
- , _flag(false)
- , _is_activated(false)
{
}
diff --git a/src/server/PortAudioDriver.hpp b/src/server/PortAudioDriver.hpp
index 5f2bf7a1..4da79632 100644
--- a/src/server/PortAudioDriver.hpp
+++ b/src/server/PortAudioDriver.hpp
@@ -124,16 +124,16 @@ protected:
Ports _ports;
PaStreamParameters _inputParameters;
PaStreamParameters _outputParameters;
- raul::Semaphore _sem;
+ raul::Semaphore _sem{0};
std::unique_ptr<FrameTimer> _timer;
- PaStream* _stream;
- size_t _seq_size;
+ PaStream* _stream{nullptr};
+ size_t _seq_size{4096};
uint32_t _block_length;
- uint32_t _sample_rate;
- uint32_t _n_inputs;
- uint32_t _n_outputs;
- std::atomic<bool> _flag;
- bool _is_activated;
+ uint32_t _sample_rate{48000};
+ uint32_t _n_inputs{0};
+ uint32_t _n_outputs{0};
+ std::atomic<bool> _flag{false};
+ bool _is_activated{false};
};
} // namespace server
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index 68392707..913c6176 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -67,24 +67,12 @@ PortImpl::PortImpl(BufferFactory& bufs,
, _index(index)
, _poly(poly)
, _buffer_size(buffer_size)
- , _frames_since_monitor(0)
- , _monitor_value(0.0f)
- , _peak(0.0f)
, _type(type)
, _buffer_type(buffer_type)
, _value(value)
, _min(bufs.forge().make(0.0f))
, _max(bufs.forge().make(1.0f))
, _voices(bufs.maid().make_managed<Voices>(poly))
- , _connected_flag(false)
- , _monitored(false)
- , _force_monitor_update(false)
- , _is_morph(false)
- , _is_auto_morph(false)
- , _is_logarithmic(false)
- , _is_sample_rate(false)
- , _is_toggled(false)
- , _is_driver_port(false)
, _is_output(is_output)
{
assert(block != nullptr);
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp
index 11c82539..41c450e3 100644
--- a/src/server/PortImpl.hpp
+++ b/src/server/PortImpl.hpp
@@ -297,9 +297,9 @@ protected:
uint32_t _index;
uint32_t _poly;
uint32_t _buffer_size;
- uint32_t _frames_since_monitor;
- float _monitor_value;
- float _peak;
+ uint32_t _frames_since_monitor{0};
+ float _monitor_value{0.0f};
+ float _peak{0.0f};
PortType _type;
LV2_URID _buffer_type;
Atom _value;
@@ -308,15 +308,15 @@ protected:
raul::managed_ptr<Voices> _voices;
raul::managed_ptr<Voices> _prepared_voices;
BufferRef _user_buffer;
- std::atomic_flag _connected_flag;
- bool _monitored;
- bool _force_monitor_update;
- bool _is_morph;
- bool _is_auto_morph;
- bool _is_logarithmic;
- bool _is_sample_rate;
- bool _is_toggled;
- bool _is_driver_port;
+ std::atomic_flag _connected_flag{false};
+ bool _monitored{false};
+ bool _force_monitor_update{false};
+ bool _is_morph{false};
+ bool _is_auto_morph{false};
+ bool _is_logarithmic{false};
+ bool _is_sample_rate{false};
+ bool _is_toggled{false};
+ bool _is_driver_port{false};
bool _is_output;
};
diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp
index b2f0fd46..6922d232 100644
--- a/src/server/PreProcessor.cpp
+++ b/src/server/PreProcessor.cpp
@@ -39,11 +39,6 @@ namespace server {
PreProcessor::PreProcessor(Engine& engine)
: _engine(engine)
- , _sem(0)
- , _head(nullptr)
- , _tail(nullptr)
- , _block_state(BlockState::UNBLOCKED)
- , _exit_flag(false)
, _thread(&PreProcessor::run, this)
{}
diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp
index 05027638..832b545e 100644
--- a/src/server/PreProcessor.hpp
+++ b/src/server/PreProcessor.hpp
@@ -76,11 +76,11 @@ private:
Engine& _engine;
std::mutex _mutex;
- raul::Semaphore _sem;
- std::atomic<Event*> _head;
- std::atomic<Event*> _tail;
- std::atomic<BlockState> _block_state;
- bool _exit_flag;
+ raul::Semaphore _sem{0};
+ std::atomic<Event*> _head{nullptr};
+ std::atomic<Event*> _tail{nullptr};
+ std::atomic<BlockState> _block_state{BlockState::UNBLOCKED};
+ bool _exit_flag{false};
std::thread _thread;
};
diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp
index a61e4afb..05f57bf5 100644
--- a/src/server/RunContext.cpp
+++ b/src/server/RunContext.cpp
@@ -63,22 +63,13 @@ RunContext::RunContext(Engine& engine,
bool threaded)
: _engine(engine)
, _event_sink(event_sink)
- , _task(nullptr)
, _thread(threaded ? new std::thread(&RunContext::run, this) : nullptr)
, _id(id)
- , _start(0)
- , _end(0)
- , _offset(0)
- , _nframes(0)
- , _rate(0)
- , _realtime(true)
{}
RunContext::RunContext(const RunContext& copy)
: _engine(copy._engine)
, _event_sink(copy._event_sink)
- , _task(nullptr)
- , _thread(nullptr)
, _id(copy._id)
, _start(copy._start)
, _end(copy._end)
diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp
index 92aa1cf8..f39b5864 100644
--- a/src/server/RunContext.hpp
+++ b/src/server/RunContext.hpp
@@ -143,18 +143,18 @@ public:
protected:
void run();
- Engine& _engine; ///< Engine we're running in
- raul::RingBuffer* _event_sink; ///< Updates from process context
- Task* _task; ///< Currently executing task
- std::unique_ptr<std::thread> _thread; ///< Thread (or null for main)
- unsigned _id; ///< Context ID
-
- FrameTime _start; ///< Start frame of this cycle, timeline relative
- FrameTime _end; ///< End frame of this cycle, timeline relative
- SampleCount _offset; ///< Offset into data buffers
- SampleCount _nframes; ///< Number of frames past offset to process
- SampleCount _rate; ///< Sample rate in Hz
- bool _realtime; ///< True iff context is hard realtime
+ Engine& _engine; ///< Engine we're running in
+ raul::RingBuffer* _event_sink; ///< Updates from notify()
+ Task* _task{nullptr}; ///< Currently executing task
+ std::unique_ptr<std::thread> _thread; ///< Thread (or null for main)
+ unsigned _id; ///< Context ID
+
+ FrameTime _start{0}; ///< Start frame of this cycle (timeline)
+ FrameTime _end{0}; ///< End frame of this cycle (timeline)
+ SampleCount _offset{0}; ///< Offset into data buffers
+ SampleCount _nframes{0}; ///< Number of frames past offset to process
+ SampleCount _rate{0}; ///< Sample rate in Hz
+ bool _realtime{true}; ///< True iff context is hard realtime
};
} // namespace server
diff --git a/src/server/Task.hpp b/src/server/Task.hpp
index a7657499..7a50fe8e 100644
--- a/src/server/Task.hpp
+++ b/src/server/Task.hpp
@@ -43,9 +43,6 @@ public:
Task(Mode mode, BlockImpl* block = nullptr)
: _block(block)
, _mode(mode)
- , _done_end(0)
- , _next(0)
- , _done(false)
{
assert(!(mode == Mode::SINGLE && !block));
}
@@ -110,12 +107,12 @@ private:
_children.emplace_back(std::move(t));
}
- Children _children; ///< Vector of child tasks
- BlockImpl* _block; ///< Used for SINGLE only
- Mode _mode; ///< Execution mode
- unsigned _done_end; ///< Index of rightmost done sub-task
- std::atomic<unsigned> _next; ///< Index of next sub-task
- std::atomic<bool> _done; ///< Completion phase
+ Children _children; ///< Vector of child tasks
+ BlockImpl* _block; ///< Used for SINGLE only
+ Mode _mode; ///< Execution mode
+ unsigned _done_end{0}; ///< Index of rightmost done sub-task
+ std::atomic<unsigned> _next{0}; ///< Index of next sub-task
+ std::atomic<bool> _done{false}; ///< Completion phase
};
} // namespace server
diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp
index a6d90e9c..081d3ff4 100644
--- a/src/server/UndoStack.hpp
+++ b/src/server/UndoStack.hpp
@@ -83,10 +83,7 @@ public:
std::deque<LV2_Atom*> events;
};
- UndoStack(URIs& uris, URIMap& map) noexcept
- : _uris(uris), _map(map), _depth(0)
- {
- }
+ UndoStack(URIs& uris, URIMap& map) noexcept : _uris(uris), _map(map) {}
int start_entry();
bool write(const LV2_Atom* msg, int32_t default_id=0) override;
@@ -109,7 +106,7 @@ private:
URIs& _uris;
URIMap& _map;
std::deque<Entry> _stack;
- int _depth;
+ int _depth{0};
};
} // namespace server
diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp
index 77d98612..bb282365 100644
--- a/src/server/Worker.cpp
+++ b/src/server/Worker.cpp
@@ -116,13 +116,11 @@ Worker::Schedule::feature(World&, Node* n)
Worker::Worker(Log& log, uint32_t buffer_size, bool synchronous)
: _schedule(new Schedule(synchronous))
, _log(log)
- , _sem(0)
, _requests(buffer_size)
, _responses(buffer_size)
, _buffer(static_cast<uint8_t*>(malloc(buffer_size)))
, _buffer_size(buffer_size)
, _thread(nullptr)
- , _exit_flag(false)
, _synchronous(synchronous)
{
if (!synchronous) {
diff --git a/src/server/Worker.hpp b/src/server/Worker.hpp
index ed9a2470..540347df 100644
--- a/src/server/Worker.hpp
+++ b/src/server/Worker.hpp
@@ -63,13 +63,13 @@ private:
std::shared_ptr<Schedule> _schedule;
Log& _log;
- raul::Semaphore _sem;
+ raul::Semaphore _sem{0};
raul::RingBuffer _requests;
raul::RingBuffer _responses;
uint8_t* const _buffer;
const uint32_t _buffer_size;
std::unique_ptr<std::thread> _thread;
- bool _exit_flag;
+ bool _exit_flag{false};
bool _synchronous;
void run();
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index 234bc550..1fa02ae8 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -52,8 +52,6 @@ Connect::Connect(Engine& engine,
const ingen::Connect& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
- , _graph(nullptr)
- , _head(nullptr)
{
}
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp
index 941c0a25..a735b68c 100644
--- a/src/server/events/Connect.hpp
+++ b/src/server/events/Connect.hpp
@@ -64,8 +64,8 @@ public:
private:
const ingen::Connect _msg;
- GraphImpl* _graph;
- InputPort* _head;
+ GraphImpl* _graph{nullptr};
+ InputPort* _head{nullptr};
raul::managed_ptr<CompiledGraph> _compiled_graph;
std::shared_ptr<ArcImpl> _arc;
raul::managed_ptr<PortImpl::Voices> _voices;
diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp
index ebfea41d..7f92842e 100644
--- a/src/server/events/Copy.cpp
+++ b/src/server/events/Copy.cpp
@@ -52,9 +52,6 @@ Copy::Copy(Engine& engine,
const ingen::Copy& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
- , _old_block(nullptr)
- , _parent(nullptr)
- , _block(nullptr)
{}
Copy::~Copy() = default;
diff --git a/src/server/events/Copy.hpp b/src/server/events/Copy.hpp
index f9c507f0..8460140a 100644
--- a/src/server/events/Copy.hpp
+++ b/src/server/events/Copy.hpp
@@ -64,9 +64,9 @@ private:
bool filesystem_to_engine(PreProcessContext& ctx);
const ingen::Copy _msg;
- std::shared_ptr<BlockImpl> _old_block;
- GraphImpl* _parent;
- BlockImpl* _block;
+ std::shared_ptr<BlockImpl> _old_block{nullptr};
+ GraphImpl* _parent{nullptr};
+ BlockImpl* _block{nullptr};
raul::managed_ptr<CompiledGraph> _compiled_graph;
};
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp
index 742eabfe..6d0dbe3e 100644
--- a/src/server/events/CreateBlock.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -64,8 +64,6 @@ CreateBlock::CreateBlock(Engine& engine,
: Event(engine, client, id, timestamp)
, _path(std::move(path))
, _properties(properties)
- , _graph(nullptr)
- , _block(nullptr)
{}
CreateBlock::~CreateBlock() = default;
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp
index 97a54b3f..2a7a60ab 100644
--- a/src/server/events/CreateBlock.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -68,8 +68,8 @@ private:
raul::Path _path;
Properties& _properties;
ClientUpdate _update;
- GraphImpl* _graph;
- BlockImpl* _block;
+ GraphImpl* _graph{nullptr};
+ BlockImpl* _block{nullptr};
raul::managed_ptr<CompiledGraph> _compiled_graph;
};
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index 895a84e7..367bedfe 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -58,8 +58,6 @@ CreateGraph::CreateGraph(Engine& engine,
: Event(engine, client, id, timestamp)
, _path(std::move(path))
, _properties(properties)
- , _graph(nullptr)
- , _parent(nullptr)
{
}
diff --git a/src/server/events/CreateGraph.hpp b/src/server/events/CreateGraph.hpp
index d9e994c0..46ca3266 100644
--- a/src/server/events/CreateGraph.hpp
+++ b/src/server/events/CreateGraph.hpp
@@ -72,8 +72,8 @@ private:
const raul::Path _path;
Properties _properties;
ClientUpdate _update;
- GraphImpl* _graph;
- GraphImpl* _parent;
+ GraphImpl* _graph{nullptr};
+ GraphImpl* _parent{nullptr};
raul::managed_ptr<CompiledGraph> _compiled_graph;
std::list<std::unique_ptr<Event>> _child_events;
};
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index ba2c9a9a..5ea9db33 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -58,10 +58,6 @@ CreatePort::CreatePort(Engine& engine,
: Event(engine, client, id, timestamp)
, _path(std::move(path))
, _port_type(PortType::UNKNOWN)
- , _buf_type(0)
- , _graph(nullptr)
- , _graph_port(nullptr)
- , _engine_port(nullptr)
, _properties(properties)
{
const ingen::URIs& uris = _engine.world().uris();
diff --git a/src/server/events/CreatePort.hpp b/src/server/events/CreatePort.hpp
index 73746434..3351adc9 100644
--- a/src/server/events/CreatePort.hpp
+++ b/src/server/events/CreatePort.hpp
@@ -74,11 +74,11 @@ private:
raul::Path _path;
PortType _port_type;
- LV2_URID _buf_type;
- GraphImpl* _graph;
- DuplexPort* _graph_port;
+ LV2_URID _buf_type{0};
+ GraphImpl* _graph{nullptr};
+ DuplexPort* _graph_port{nullptr};
raul::managed_ptr<BlockImpl::Ports> _ports_array; ///< New external port array for Graph
- EnginePort* _engine_port; ///< Driver port if on the root
+ EnginePort* _engine_port{nullptr}; ///< Driver port if on the root
Properties _properties;
Properties _update;
boost::optional<Flow> _flow;
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index bdd25f1b..aba49adb 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -62,8 +62,6 @@ Delete::Delete(Engine& engine,
const ingen::Del& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
- , _engine_port(nullptr)
- , _disconnect_event(nullptr)
{
if (uri_is_path(msg.uri)) {
_path = uri_to_path(msg.uri);
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index 50a925b5..7dfb5681 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -77,7 +77,7 @@ private:
raul::Path _path;
std::shared_ptr<BlockImpl> _block; ///< Non-null iff a block
std::shared_ptr<DuplexPort> _port; ///< Non-null iff a port
- EnginePort* _engine_port;
+ EnginePort* _engine_port{nullptr};
raul::managed_ptr<GraphImpl::Ports> _ports_array; ///< New (external) ports for Graph
raul::managed_ptr<CompiledGraph> _compiled_graph; ///< Graph's new process order
std::unique_ptr<DisconnectAll> _disconnect_event;
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 09d9c3b2..2c6a50c8 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -68,16 +68,10 @@ Delta::Delta(Engine& engine,
SampleCount timestamp,
const ingen::Put& msg)
: Event(engine, client, msg.seq, timestamp)
- , _create_event(nullptr)
, _subject(msg.uri)
, _properties(msg.properties)
- , _object(nullptr)
- , _graph(nullptr)
- , _binding(nullptr)
- , _state()
, _context(msg.ctx)
, _type(Type::PUT)
- , _block(false)
{
init();
}
@@ -91,13 +85,8 @@ Delta::Delta(Engine& engine,
, _subject(msg.uri)
, _properties(msg.add)
, _remove(msg.remove)
- , _object(nullptr)
- , _graph(nullptr)
- , _binding(nullptr)
- , _state(nullptr)
, _context(msg.ctx)
, _type(Type::PATCH)
- , _block(false)
{
init();
}
@@ -109,13 +98,8 @@ Delta::Delta(Engine& engine,
: Event(engine, client, msg.seq, timestamp)
, _subject(msg.subject)
, _properties{{msg.predicate, msg.value}}
- , _object(nullptr)
- , _graph(nullptr)
- , _binding(nullptr)
- , _state(nullptr)
, _context(msg.ctx)
, _type(Type::SET)
- , _block(false)
{
init();
}
diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp
index 64ee67db..7f79ae94 100644
--- a/src/server/events/Delta.hpp
+++ b/src/server/events/Delta.hpp
@@ -116,10 +116,10 @@ private:
Properties _properties;
Properties _remove;
ClientUpdate _update;
- ingen::Resource* _object;
- GraphImpl* _graph;
+ ingen::Resource* _object{nullptr};
+ GraphImpl* _graph{nullptr};
raul::managed_ptr<CompiledGraph> _compiled_graph;
- ControlBindings::Binding* _binding;
+ ControlBindings::Binding* _binding{nullptr};
StatePtr _state;
Resource::Graph _context;
Type _type;
@@ -131,7 +131,7 @@ private:
boost::optional<Resource> _preset;
- bool _block;
+ bool _block{false};
};
} // namespace events
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index ea6bb8f0..b600df4f 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -60,7 +60,6 @@ Disconnect::Disconnect(Engine& engine,
const ingen::Disconnect& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
- , _graph(nullptr)
{
}
diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp
index a835ed27..c6db44be 100644
--- a/src/server/events/Disconnect.hpp
+++ b/src/server/events/Disconnect.hpp
@@ -80,7 +80,7 @@ public:
private:
const ingen::Disconnect _msg;
- GraphImpl* _graph;
+ GraphImpl* _graph{nullptr};
std::unique_ptr<Impl> _impl;
raul::managed_ptr<CompiledGraph> _compiled_graph;
};
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 219af6fe..ff801c06 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -47,8 +47,6 @@ Get::Get(Engine& engine,
const ingen::Get& msg)
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
- , _object(nullptr)
- , _plugin(nullptr)
{}
bool
diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp
index fd3f8569..1ec49bfa 100644
--- a/src/server/events/Get.hpp
+++ b/src/server/events/Get.hpp
@@ -58,8 +58,8 @@ public:
private:
const ingen::Get _msg;
- const Node* _object;
- PluginImpl* _plugin;
+ const Node* _object{nullptr};
+ PluginImpl* _plugin{nullptr};
BlockFactory::Plugins _plugins;
ClientUpdate _response;
};
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 90b9d944..6f538ddc 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -124,15 +124,9 @@ public:
*this)
, _from_ui(ui_ring_size(block_length))
, _to_ui(ui_ring_size(block_length))
- , _root_graph(nullptr)
- , _notify_capacity(0)
, _block_length(block_length)
, _seq_size(seq_size)
, _sample_rate(sample_rate)
- , _frame_time(0)
- , _to_ui_overflow_sem(0)
- , _to_ui_overflow(false)
- , _instantiated(false)
{}
bool dynamic_ports() const override { return !_instantiated; }
@@ -413,15 +407,15 @@ private:
AtomWriter _writer;
raul::RingBuffer _from_ui;
raul::RingBuffer _to_ui;
- GraphImpl* _root_graph;
- uint32_t _notify_capacity;
+ GraphImpl* _root_graph{nullptr};
+ uint32_t _notify_capacity{0};
SampleCount _block_length;
size_t _seq_size;
SampleCount _sample_rate;
- SampleCount _frame_time;
- raul::Semaphore _to_ui_overflow_sem;
- bool _to_ui_overflow;
- bool _instantiated;
+ SampleCount _frame_time{0};
+ raul::Semaphore _to_ui_overflow_sem{0};
+ bool _to_ui_overflow{false};
+ bool _instantiated{false};
};
struct IngenPlugin {
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp
index d0d8cd39..d8445a8a 100644
--- a/src/server/internals/Controller.cpp
+++ b/src/server/internals/Controller.cpp
@@ -60,7 +60,6 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
GraphImpl* parent,
SampleRate srate)
: InternalBlock(plugin, symbol, false, parent, srate)
- , _learning(false)
{
const ingen::URIs& uris = bufs.uris();
_ports = bufs.maid().make_managed<Ports>(7);
diff --git a/src/server/internals/Controller.hpp b/src/server/internals/Controller.hpp
index b5cea110..2a0bc834 100644
--- a/src/server/internals/Controller.hpp
+++ b/src/server/internals/Controller.hpp
@@ -74,7 +74,7 @@ private:
InputPort* _min_port;
InputPort* _max_port;
OutputPort* _audio_port;
- bool _learning;
+ bool _learning{false};
};
} // namespace internals
diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp
index 4952310b..e67cd441 100644
--- a/src/server/internals/Note.cpp
+++ b/src/server/internals/Note.cpp
@@ -64,7 +64,6 @@ NoteNode::NoteNode(InternalPlugin* plugin,
SampleRate srate)
: InternalBlock(plugin, symbol, polyphonic, parent, srate)
, _voices(bufs.maid().make_managed<Voices>(_polyphony))
- , _sustain(false)
{
const ingen::URIs& uris = bufs.uris();
_ports = bufs.maid().make_managed<Ports>(8);
diff --git a/src/server/internals/Note.hpp b/src/server/internals/Note.hpp
index 80816131..082a852c 100644
--- a/src/server/internals/Note.hpp
+++ b/src/server/internals/Note.hpp
@@ -105,7 +105,7 @@ private:
raul::managed_ptr<Voices> _prepared_voices;
Key _keys[128];
- bool _sustain; ///< Whether or not hold pedal is depressed
+ bool _sustain{false}; ///< Whether or not hold pedal is depressed
InputPort* _midi_in_port;
OutputPort* _freq_port;
diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp
index 645ffabb..19e320c9 100644
--- a/src/server/internals/Trigger.cpp
+++ b/src/server/internals/Trigger.cpp
@@ -60,7 +60,6 @@ TriggerNode::TriggerNode(InternalPlugin* plugin,
GraphImpl* parent,
SampleRate srate)
: InternalBlock(plugin, symbol, false, parent, srate)
- , _learning(false)
{
const ingen::URIs& uris = bufs.uris();
_ports = bufs.maid().make_managed<Ports>(6);
diff --git a/src/server/internals/Trigger.hpp b/src/server/internals/Trigger.hpp
index d9553c3e..74634202 100644
--- a/src/server/internals/Trigger.hpp
+++ b/src/server/internals/Trigger.hpp
@@ -71,7 +71,7 @@ public:
static InternalPlugin* internal_plugin(URIs& uris);
private:
- bool _learning;
+ bool _learning{false};
InputPort* _midi_in_port;
OutputPort* _midi_out_port;