diff options
author | David Robillard <d@drobilla.net> | 2017-12-25 13:59:47 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-12-25 16:26:13 -0500 |
commit | d6a9571641bcb34acb3521feb08eea33195fd9ca (patch) | |
tree | 5c28e2800d829b7b1896e2fcbe3f8870b88e039d /src/server/events | |
parent | 25177612b20f7d3ebd4138fed9cd9acffec7e756 (diff) | |
download | ingen-d6a9571641bcb34acb3521feb08eea33195fd9ca.tar.gz ingen-d6a9571641bcb34acb3521feb08eea33195fd9ca.tar.bz2 ingen-d6a9571641bcb34acb3521feb08eea33195fd9ca.zip |
Use nullptr
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/Connect.cpp | 4 | ||||
-rw-r--r-- | src/server/events/Copy.cpp | 6 | ||||
-rw-r--r-- | src/server/events/CreateBlock.cpp | 6 | ||||
-rw-r--r-- | src/server/events/CreateGraph.cpp | 4 | ||||
-rw-r--r-- | src/server/events/CreatePort.cpp | 6 | ||||
-rw-r--r-- | src/server/events/Delete.cpp | 6 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 36 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 6 | ||||
-rw-r--r-- | src/server/events/DisconnectAll.cpp | 6 | ||||
-rw-r--r-- | src/server/events/Get.cpp | 10 |
10 files changed, 45 insertions, 45 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index 306c7533..8937b327 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -40,8 +40,8 @@ Connect::Connect(Engine& engine, const Ingen::Connect& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _graph(NULL) - , _head(NULL) + , _graph(nullptr) + , _head(nullptr) {} bool diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index c83acb6e..b1cea1db 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -37,9 +37,9 @@ Copy::Copy(Engine& engine, const Ingen::Copy& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _old_block(NULL) - , _parent(NULL) - , _block(NULL) + , _old_block(nullptr) + , _parent(nullptr) + , _block(nullptr) {} bool diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index c636bf3c..d2a7d350 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -44,8 +44,8 @@ CreateBlock::CreateBlock(Engine& engine, : Event(engine, client, id, timestamp) , _path(path) , _properties(properties) - , _graph(NULL) - , _block(NULL) + , _graph(nullptr) + , _block(nullptr) {} bool @@ -116,7 +116,7 @@ CreateBlock::pre_process(PreProcessContext& ctx) } // Load state from directory if given in properties - LilvState* state = NULL; + LilvState* state = nullptr; Properties::iterator s = _properties.find(uris.state_state); if (s != _properties.end() && s->second.type() == uris.forge.Path) { state = LV2Block::load_state(_engine.world(), s->second.ptr<char>()); diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index a22160ba..7a2c7304 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -40,8 +40,8 @@ CreateGraph::CreateGraph(Engine& engine, : Event(engine, client, id, timestamp) , _path(path) , _properties(properties) - , _graph(NULL) - , _parent(NULL) + , _graph(nullptr) + , _parent(nullptr) {} CreateGraph::~CreateGraph() diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index bc43ca41..e17b8b01 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -46,9 +46,9 @@ CreatePort::CreatePort(Engine& engine, , _path(path) , _port_type(PortType::UNKNOWN) , _buf_type(0) - , _graph(NULL) - , _graph_port(NULL) - , _engine_port(NULL) + , _graph(nullptr) + , _graph_port(nullptr) + , _engine_port(nullptr) , _properties(properties) { const Ingen::URIs& uris = _engine.world()->uris(); diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index b83dcef9..e50e5fa8 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -41,8 +41,8 @@ Delete::Delete(Engine& engine, const Ingen::Del& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _engine_port(NULL) - , _disconnect_event(NULL) + , _engine_port(nullptr) + , _disconnect_event(nullptr) { if (uri_is_path(msg.uri)) { _path = uri_to_path(msg.uri); @@ -142,7 +142,7 @@ Delete::execute(RunContext& context) _engine.control_bindings()->remove(context, _removed_bindings); } - GraphImpl* parent = _block ? _block->parent_graph() : NULL; + GraphImpl* parent = _block ? _block->parent_graph() : nullptr; if (_port) { // Adjust port indices if necessary for (size_t i = 0; i < _ports_array->size(); ++i) { diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 0b26b797..e5ff8325 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -47,13 +47,13 @@ Delta::Delta(Engine& engine, SampleCount timestamp, const Ingen::Put& msg) : Event(engine, client, msg.seq, timestamp) - , _create_event(NULL) + , _create_event(nullptr) , _subject(msg.uri) , _properties(msg.properties) - , _object(NULL) - , _graph(NULL) - , _binding(NULL) - , _state(NULL) + , _object(nullptr) + , _graph(nullptr) + , _binding(nullptr) + , _state(nullptr) , _context(msg.ctx) , _type(Type::PUT) , _block(false) @@ -66,14 +66,14 @@ Delta::Delta(Engine& engine, SampleCount timestamp, const Ingen::Delta& msg) : Event(engine, client, msg.seq, timestamp) - , _create_event(NULL) + , _create_event(nullptr) , _subject(msg.uri) , _properties(msg.add) , _remove(msg.remove) - , _object(NULL) - , _graph(NULL) - , _binding(NULL) - , _state(NULL) + , _object(nullptr) + , _graph(nullptr) + , _binding(nullptr) + , _state(nullptr) , _context(msg.ctx) , _type(Type::PATCH) , _block(false) @@ -86,13 +86,13 @@ Delta::Delta(Engine& engine, SampleCount timestamp, const Ingen::SetProperty& msg) : Event(engine, client, msg.seq, timestamp) - , _create_event(NULL) + , _create_event(nullptr) , _subject(msg.subject) , _properties{{msg.predicate, msg.value}} - , _object(NULL) - , _graph(NULL) - , _binding(NULL) - , _state(NULL) + , _object(nullptr) + , _graph(nullptr) + , _binding(nullptr) + , _state(nullptr) , _context(msg.ctx) , _type(Type::SET) , _block(false) @@ -159,14 +159,14 @@ static LilvNode* get_file_node(LilvWorld* lworld, const URIs& uris, const Atom& value) { if (value.type() == uris.atom_Path) { - return lilv_new_file_uri(lworld, NULL, value.ptr<char>()); + return lilv_new_file_uri(lworld, nullptr, value.ptr<char>()); } else if (uris.forge.is_uri(value)) { const std::string str = uris.forge.str(value, false); if (str.substr(0, 5) == "file:") { return lilv_new_uri(lworld, value.ptr<char>()); } } - return NULL; + return nullptr; } bool @@ -324,7 +324,7 @@ Delta::pre_process(PreProcessContext& ctx) } } - BlockImpl* block = NULL; + BlockImpl* block = nullptr; PortImpl* port = dynamic_cast<PortImpl*>(_object); if (port) { if (key == uris.ingen_broadcast) { diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index f043d7dc..7e38ffe1 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -43,8 +43,8 @@ Disconnect::Disconnect(Engine& engine, const Ingen::Disconnect& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _graph(NULL) - , _impl(NULL) + , _graph(nullptr) + , _impl(nullptr) { } @@ -150,7 +150,7 @@ Disconnect::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::NOT_FOUND, _msg.head); } - if (tail_block == NULL || head_block == NULL) { + if (tail_block == nullptr || head_block == nullptr) { return Event::pre_process_done(Status::PARENT_NOT_FOUND, _msg.head); } diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index afb9c8cb..6d018c81 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -43,9 +43,9 @@ DisconnectAll::DisconnectAll(Engine& engine, const Ingen::DisconnectAll& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _parent(NULL) - , _block(NULL) - , _port(NULL) + , _parent(nullptr) + , _block(nullptr) + , _port(nullptr) , _deleting(false) { } diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index 64af9363..e4a5c760 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -39,8 +39,8 @@ Get::Get(Engine& engine, const Ingen::Get& msg) : Event(engine, client, msg.seq, timestamp) , _msg(msg) - , _object(NULL) - , _plugin(NULL) + , _object(nullptr) + , _plugin(nullptr) {} bool @@ -56,9 +56,9 @@ Get::pre_process(PreProcessContext& ctx) return Event::pre_process_done(Status::SUCCESS); } else if (uri_is_path(uri)) { if ((_object = _engine.store()->get(uri_to_path(uri)))) { - const BlockImpl* block = NULL; - const GraphImpl* graph = NULL; - const PortImpl* port = NULL; + const BlockImpl* block = nullptr; + const GraphImpl* graph = nullptr; + const PortImpl* port = nullptr; if ((graph = dynamic_cast<const GraphImpl*>(_object))) { _response.put_graph(graph); } else if ((block = dynamic_cast<const BlockImpl*>(_object))) { |