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:
		| @@ -31,11 +31,6 @@ DetachedSong::DetachedSong(const LightSong &other) | ||||
| 	 start_time(other.start_time), | ||||
| 	 end_time(other.end_time) {} | ||||
|  | ||||
| DetachedSong::~DetachedSong() | ||||
| { | ||||
| 	/* this destructor exists here just so it won't  inlined */ | ||||
| } | ||||
|  | ||||
| bool | ||||
| DetachedSong::IsRemote() const | ||||
| { | ||||
|   | ||||
| @@ -98,7 +98,8 @@ public: | ||||
| 	 */ | ||||
| 	explicit DetachedSong(const LightSong &other); | ||||
|  | ||||
| 	~DetachedSong(); | ||||
| 	gcc_noinline | ||||
| 	~DetachedSong() = default; | ||||
|  | ||||
| 	/* these are declared because the user-defined destructor | ||||
| 	   above prevents them from being generated implicitly */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann