summaryrefslogtreecommitdiffstats
path: root/include/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 01:20:27 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 01:20:27 -0400
commit44381dbda9dbf8d20894789fe8e3ea941b70a1d0 (patch)
tree27c4da20f5a796825f7485aa7a1f447ff423f0f6 /include/ingen
parent9126ed67acf17bb2009430cb6de25b2ffd783d8e (diff)
downloadingen-44381dbda9dbf8d20894789fe8e3ea941b70a1d0.tar.gz
ingen-44381dbda9dbf8d20894789fe8e3ea941b70a1d0.tar.bz2
ingen-44381dbda9dbf8d20894789fe8e3ea941b70a1d0.zip
Use default member initialization
Diffstat (limited to 'include/ingen')
-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
7 files changed, 20 insertions, 22 deletions
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;