From df897ef5b01a045769ffb71ebc6dead179db857c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 2 Aug 2020 14:15:38 +0200 Subject: Use nullptr for empty smart pointers --- include/ingen/DataAccess.hpp | 4 ++-- include/ingen/InstanceAccess.hpp | 4 ++-- include/ingen/Interface.hpp | 2 +- include/ingen/LV2Features.hpp | 2 +- include/ingen/client/SocketClient.hpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include/ingen') diff --git a/include/ingen/DataAccess.hpp b/include/ingen/DataAccess.hpp index b06c8dec..49bb6102 100644 --- a/include/ingen/DataAccess.hpp +++ b/include/ingen/DataAccess.hpp @@ -44,12 +44,12 @@ struct DataAccess : public ingen::LV2Features::Feature SPtr feature(World& world, Node* node) override { Node* store_node = world.store()->get(node->path()); if (!store_node) { - return SPtr(); + return nullptr; } LilvInstance* inst = store_node->instance(); if (!inst) { - return SPtr(); + return nullptr; } const LV2_Descriptor* desc = lilv_instance_get_descriptor(inst); diff --git a/include/ingen/InstanceAccess.hpp b/include/ingen/InstanceAccess.hpp index 4d67d8db..500f4902 100644 --- a/include/ingen/InstanceAccess.hpp +++ b/include/ingen/InstanceAccess.hpp @@ -37,12 +37,12 @@ struct InstanceAccess : public ingen::LV2Features::Feature SPtr feature(World& world, Node* node) override { Node* store_node = world.store()->get(node->path()); if (!store_node) { - return SPtr(); + return nullptr; } LilvInstance* instance = store_node->instance(); if (!instance) { - return SPtr(); + return nullptr; } return std::make_shared( diff --git a/include/ingen/Interface.hpp b/include/ingen/Interface.hpp index 8a87af8b..98c0d4cd 100644 --- a/include/ingen/Interface.hpp +++ b/include/ingen/Interface.hpp @@ -55,7 +55,7 @@ public: virtual URI uri() const = 0; - virtual SPtr respondee() const { return SPtr(); } + virtual SPtr respondee() const { return nullptr; } virtual void set_respondee(const SPtr& respondee) {} diff --git a/include/ingen/LV2Features.hpp b/include/ingen/LV2Features.hpp index ae201bf6..792ee9d9 100644 --- a/include/ingen/LV2Features.hpp +++ b/include/ingen/LV2Features.hpp @@ -57,7 +57,7 @@ protected: const char* uri() const override { return _uri; } SPtr feature(World& world, Node* block) override { - return SPtr(); + return nullptr; } const char* _uri; diff --git a/include/ingen/client/SocketClient.hpp b/include/ingen/client/SocketClient.hpp index 8e551821..642ae1ef 100644 --- a/include/ingen/client/SocketClient.hpp +++ b/include/ingen/client/SocketClient.hpp @@ -59,7 +59,7 @@ public: if (!sock->connect(uri)) { world.log().error("Failed to connect <%1%> (%2%)\n", sock->uri(), strerror(errno)); - return SPtr(); + return nullptr; } return SPtr(new SocketClient(world, uri, sock, respondee)); } -- cgit v1.2.1