mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add a comment on using empty ctor for mock classes derived from GObjects
This commit is contained in:
parent
3d92d53917
commit
861a2482fe
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user