summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-02 14:15:38 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 14:21:39 +0200
commitdf897ef5b01a045769ffb71ebc6dead179db857c (patch)
tree3bdb14e7315477d6e322e11bb5e2300f0de99b90 /include
parent62f5c3124b991abe9b9423a4908ca076079d5327 (diff)
downloadingen-df897ef5b01a045769ffb71ebc6dead179db857c.tar.gz
ingen-df897ef5b01a045769ffb71ebc6dead179db857c.tar.bz2
ingen-df897ef5b01a045769ffb71ebc6dead179db857c.zip
Use nullptr for empty smart pointers
Diffstat (limited to 'include')
-rw-r--r--include/ingen/DataAccess.hpp4
-rw-r--r--include/ingen/InstanceAccess.hpp4
-rw-r--r--include/ingen/Interface.hpp2
-rw-r--r--include/ingen/LV2Features.hpp2
-rw-r--r--include/ingen/client/SocketClient.hpp2
5 files changed, 7 insertions, 7 deletions
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<LV2_Feature> feature(World& world, Node* node) override {
Node* store_node = world.store()->get(node->path());
if (!store_node) {
- return SPtr<LV2_Feature>();
+ return nullptr;
}
LilvInstance* inst = store_node->instance();
if (!inst) {
- return SPtr<LV2_Feature>();
+ 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<LV2_Feature> feature(World& world, Node* node) override {
Node* store_node = world.store()->get(node->path());
if (!store_node) {
- return SPtr<LV2_Feature>();
+ return nullptr;
}
LilvInstance* instance = store_node->instance();
if (!instance) {
- return SPtr<LV2_Feature>();
+ return nullptr;
}
return std::make_shared<LV2_Feature>(
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<Interface> respondee() const { return SPtr<Interface>(); }
+ virtual SPtr<Interface> respondee() const { return nullptr; }
virtual void set_respondee(const SPtr<Interface>& 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<LV2_Feature> feature(World& world, Node* block) override {
- return SPtr<LV2_Feature>();
+ 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<Interface>();
+ return nullptr;
}
return SPtr<Interface>(new SocketClient(world, uri, sock, respondee));
}