Add a comment on using empty ctor for mock classes derived from GObjects

This commit is contained in:
Christian Gruber 2020-07-10 23:03:01 +02:00
parent 3d92d53917
commit 861a2482fe

View File

@ -20,6 +20,9 @@ GType gnc_mock_account_get_type(void);
class MockAccount : public Account
{
public:
// note: don't use default constructor instead of empty constructor, since
// it does zero initialization, which would overwrite GObject
// initialization, which is already done in the new operator.
MockAccount() {}
void* operator new(size_t size)
{