aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-23 21:17:40 +0100
committerMax Kellermann <max@duempel.org>2014-01-23 21:17:40 +0100
commitf3f5e2e16231f8b7bef055ca1269611bcbbfcc8b (patch)
tree0a3267bfeb82961076f4f3ab8da7fea489e698fb /src/db
parentec41d849bbc460d4002ae19e3891b3bda513307e (diff)
downloadmpd-f3f5e2e16231f8b7bef055ca1269611bcbbfcc8b.tar.gz
mpd-f3f5e2e16231f8b7bef055ca1269611bcbbfcc8b.tar.xz
mpd-f3f5e2e16231f8b7bef055ca1269611bcbbfcc8b.zip
db/upnp: un-inline a few destructors
Reduce bloat.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/upnp/ContentDirectoryService.cxx5
-rw-r--r--src/db/upnp/ContentDirectoryService.hxx2
-rw-r--r--src/db/upnp/Device.cxx5
-rw-r--r--src/db/upnp/Device.hxx2
-rw-r--r--src/db/upnp/Directory.cxx5
-rw-r--r--src/db/upnp/Directory.hxx2
-rw-r--r--src/db/upnp/Object.cxx25
-rw-r--r--src/db/upnp/Object.hxx3
8 files changed, 49 insertions, 0 deletions
diff --git a/src/db/upnp/ContentDirectoryService.cxx b/src/db/upnp/ContentDirectoryService.cxx
index 1c4e43e12..35445e09d 100644
--- a/src/db/upnp/ContentDirectoryService.cxx
+++ b/src/db/upnp/ContentDirectoryService.cxx
@@ -48,6 +48,11 @@ ContentDirectoryService::ContentDirectoryService(const UPnPDevice &device,
}
}
+ContentDirectoryService::~ContentDirectoryService()
+{
+ /* this destructor exists here just so it won't get inlined */
+}
+
static bool
ReadResultTag(UPnPDirContent &dirbuf, IXML_Document *response, Error &error)
{
diff --git a/src/db/upnp/ContentDirectoryService.hxx b/src/db/upnp/ContentDirectoryService.hxx
index 18bdcde22..24be5dfbf 100644
--- a/src/db/upnp/ContentDirectoryService.hxx
+++ b/src/db/upnp/ContentDirectoryService.hxx
@@ -68,6 +68,8 @@ public:
/** An empty one */
ContentDirectoryService() = default;
+ ~ContentDirectoryService();
+
/** Read a container's children list into dirbuf.
*
* @param objectId the UPnP object Id for the container. Root has Id "0"
diff --git a/src/db/upnp/Device.cxx b/src/db/upnp/Device.cxx
index 2dab1b4c5..7bec1cccd 100644
--- a/src/db/upnp/Device.cxx
+++ b/src/db/upnp/Device.cxx
@@ -27,6 +27,11 @@
#include <string.h>
+UPnPDevice::~UPnPDevice()
+{
+ /* this destructor exists here just so it won't get inlined */
+}
+
/**
* An XML parser which constructs an UPnP device object from the
* device descriptor.
diff --git a/src/db/upnp/Device.hxx b/src/db/upnp/Device.hxx
index 49bcd2896..dd7ecac2d 100644
--- a/src/db/upnp/Device.hxx
+++ b/src/db/upnp/Device.hxx
@@ -75,6 +75,8 @@ public:
UPnPDevice(UPnPDevice &&) = default;
UPnPDevice &operator=(UPnPDevice &&) = default;
+ ~UPnPDevice();
+
/** Build device from xml description downloaded from discovery
* @param url where the description came from
* @param description the xml device description
diff --git a/src/db/upnp/Directory.cxx b/src/db/upnp/Directory.cxx
index 9f4418a70..adb8b213a 100644
--- a/src/db/upnp/Directory.cxx
+++ b/src/db/upnp/Directory.cxx
@@ -31,6 +31,11 @@
#include <string.h>
+UPnPDirContent::~UPnPDirContent()
+{
+ /* this destructor exists here just so it won't get inlined */
+}
+
gcc_pure gcc_nonnull_all
static bool
CompareStringLiteral(const char *literal, const char *value, size_t length)
diff --git a/src/db/upnp/Directory.hxx b/src/db/upnp/Directory.hxx
index 8858c9325..433979900 100644
--- a/src/db/upnp/Directory.hxx
+++ b/src/db/upnp/Directory.hxx
@@ -36,6 +36,8 @@ class UPnPDirContent {
public:
std::vector<UPnPDirObject> objects;
+ ~UPnPDirContent();
+
gcc_pure
UPnPDirObject *FindObject(const char *name) {
for (auto &o : objects)
diff --git a/src/db/upnp/Object.cxx b/src/db/upnp/Object.cxx
new file mode 100644
index 000000000..703fb0be4
--- /dev/null
+++ b/src/db/upnp/Object.cxx
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "Object.hxx"
+
+UPnPDirObject::~UPnPDirObject()
+{
+ /* this destructor exists here just so it won't get inlined */
+}
diff --git a/src/db/upnp/Object.hxx b/src/db/upnp/Object.hxx
index 65a6b323f..16a66c774 100644
--- a/src/db/upnp/Object.hxx
+++ b/src/db/upnp/Object.hxx
@@ -66,6 +66,9 @@ public:
UPnPDirObject() = default;
UPnPDirObject(UPnPDirObject &&) = default;
+
+ ~UPnPDirObject();
+
UPnPDirObject &operator=(UPnPDirObject &&) = default;
void clear()