summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-29 12:34:41 +0200
committerDavid Robillard <d@drobilla.net>2018-09-29 12:34:41 +0200
commit6244d73850074631ceaaccdf7f755970323f8de2 (patch)
tree46a849e9d527051c8849fc768ea0b0917492ae31 /src/server
parente0e437c0fd970103685db2f1d0c83a9c461ad87f (diff)
downloadingen-6244d73850074631ceaaccdf7f755970323f8de2.tar.gz
ingen-6244d73850074631ceaaccdf7f755970323f8de2.tar.bz2
ingen-6244d73850074631ceaaccdf7f755970323f8de2.zip
Use nullptr
Diffstat (limited to 'src/server')
-rw-r--r--src/server/ControlBindings.cpp14
-rw-r--r--src/server/Driver.hpp2
-rw-r--r--src/server/PostProcessor.cpp2
-rw-r--r--src/server/PreProcessor.cpp6
-rw-r--r--src/server/RunContext.hpp2
-rw-r--r--src/server/events/Delete.hpp4
6 files changed, 18 insertions, 12 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp
index 45df0e8f..94a12a7e 100644
--- a/src/server/ControlBindings.cpp
+++ b/src/server/ControlBindings.cpp
@@ -75,8 +75,11 @@ ControlBindings::binding_key(const Atom& binding) const
} else if (obj->otype == uris.midi_ChannelPressure) {
key = Key(Type::MIDI_CHANNEL_PRESSURE);
} else if (obj->otype == uris.midi_Controller) {
- lv2_atom_object_body_get(
- binding.size(), obj, (LV2_URID)uris.midi_controllerNumber, &num, NULL);
+ lv2_atom_object_body_get(binding.size(),
+ obj,
+ (LV2_URID)uris.midi_controllerNumber,
+ &num,
+ nullptr);
if (!num) {
_engine.log().rt_error("Controller binding missing number\n");
} else if (num->type != uris.atom_Int) {
@@ -85,8 +88,11 @@ ControlBindings::binding_key(const Atom& binding) const
key = Key(Type::MIDI_CC, ((LV2_Atom_Int*)num)->body);
}
} else if (obj->otype == uris.midi_NoteOn) {
- lv2_atom_object_body_get(
- binding.size(), obj, (LV2_URID)uris.midi_noteNumber, &num, NULL);
+ lv2_atom_object_body_get(binding.size(),
+ obj,
+ (LV2_URID)uris.midi_noteNumber,
+ &num,
+ nullptr);
if (!num) {
_engine.log().rt_error("Note binding missing number\n");
} else if (num->type != uris.atom_Int) {
diff --git a/src/server/Driver.hpp b/src/server/Driver.hpp
index dbb67bf3..76040395 100644
--- a/src/server/Driver.hpp
+++ b/src/server/Driver.hpp
@@ -48,7 +48,7 @@ public:
virtual void deactivate() {}
/** Create a port ready to be inserted with add_input (non realtime).
- * May return NULL if the Driver can not create the port for some reason.
+ * May return null if the Driver can not create the port for some reason.
*/
virtual EnginePort* create_port(DuplexPort* graph_port) = 0;
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp
index 02a6f639..70be6f7b 100644
--- a/src/server/PostProcessor.cpp
+++ b/src/server/PostProcessor.cpp
@@ -76,7 +76,7 @@ PostProcessor::process()
{
const FrameTime end_time = _max_time;
- /* We can never empty the list and set _head = _tail = NULL since this
+ /* We can never empty the list and set _head = _tail = null since this
would cause a race with append. Instead, head is an already
post-processed node, or initially a sentinel. */
Event* ev = _head.load();
diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp
index a9d9cf2d..dbe7ddbe 100644
--- a/src/server/PreProcessor.cpp
+++ b/src/server/PreProcessor.cpp
@@ -64,7 +64,7 @@ PreProcessor::event(Event* const ev, Event::Mode mode)
ev->set_mode(mode);
/* Note that tail is only used here, not in process(). The head must be
- checked first here, since if it is NULL the tail pointer is junk. */
+ checked first here, since if it is null the tail pointer is junk. */
Event* const head = _head.load();
if (!head) {
_head = ev;
@@ -153,10 +153,10 @@ PreProcessor::process(RunContext& context, PostProcessor& dest, size_t limit)
last->next(nullptr);
dest.append(context, head, last);
- // Since _head was not NULL, we know it hasn't been changed since
+ // Since _head was not null, we know it hasn't been changed since
_head = next;
- /* If next is NULL, then _tail may now be invalid. However, it would cause
+ /* If next is null, then _tail may now be invalid. However, it would cause
a race to reset _tail here. Instead, append() checks only _head for
emptiness, and resets the tail appropriately. */
}
diff --git a/src/server/RunContext.hpp b/src/server/RunContext.hpp
index 78580fd7..15e65806 100644
--- a/src/server/RunContext.hpp
+++ b/src/server/RunContext.hpp
@@ -144,7 +144,7 @@ protected:
Engine& _engine; ///< Engine we're running in
Raul::RingBuffer* _event_sink; ///< Port updates from process context
Task* _task; ///< Currently executing task
- std::thread* _thread; ///< Thread (NULL for main run context)
+ std::thread* _thread; ///< Thread (null for main run context)
unsigned _id; ///< Context ID
FrameTime _start; ///< Start frame of this cycle, timeline relative
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index ebc57122..4b0c314b 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -67,8 +67,8 @@ private:
const ingen::Del _msg;
Raul::Path _path;
- SPtr<BlockImpl> _block; ///< Non-NULL iff a block
- SPtr<DuplexPort> _port; ///< Non-NULL iff a port
+ SPtr<BlockImpl> _block; ///< Non-null iff a block
+ SPtr<DuplexPort> _port; ///< Non-null iff a port
EnginePort* _engine_port;
MPtr<GraphImpl::Ports> _ports_array; ///< New (external) ports for Graph
MPtr<CompiledGraph> _compiled_graph; ///< Graph's new process order