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.
This commit is contained in:
parent
08879d2a20
commit
332baa4f67
@ -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:
|
|||||||
*/
|
*/
|
||||||
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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user