Commit 332baa4f authored by Max Kellermann's avatar Max Kellermann

DetachedSong: don't declare empty destructor

An explicit destructor prevents usage of implicit move operators, even if it's empty. Therefore, declaring a defaulted destructor with GCC attribute "noinline" does what we want without preventing those implicit operators.
parent 08879d2a
...@@ -31,11 +31,6 @@ DetachedSong::DetachedSong(const LightSong &other) ...@@ -31,11 +31,6 @@ DetachedSong::DetachedSong(const LightSong &other)
start_time(other.start_time), start_time(other.start_time),
end_time(other.end_time) {} end_time(other.end_time) {}
DetachedSong::~DetachedSong()
{
/* this destructor exists here just so it won't inlined */
}
bool bool
DetachedSong::IsRemote() const DetachedSong::IsRemote() const
{ {
......
...@@ -98,7 +98,8 @@ public: ...@@ -98,7 +98,8 @@ public:
*/ */
explicit DetachedSong(const LightSong &other); explicit DetachedSong(const LightSong &other);
~DetachedSong(); gcc_noinline
~DetachedSong() = default;
/* these are declared because the user-defined destructor /* these are declared because the user-defined destructor
above prevents them from being generated implicitly */ above prevents them from being generated implicitly */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment