Skip to content

nullptr initialisation of FormatArg pointers, runtime debug mode checks#43

Merged
c42f merged 2 commits intoc42f:masterfrom
nigels-com:formatarg-initialisation
Oct 4, 2017
Merged

nullptr initialisation of FormatArg pointers, runtime debug mode checks#43
c42f merged 2 commits intoc42f:masterfrom
nigels-com:formatarg-initialisation

Conversation

@nigels-com
Copy link
Contributor

Proposed fix for Issue #42

Initialise FormatArg pointers in default constructor, runtime assertions.

@c42f c42f merged commit 6b79b4b into c42f:master Oct 4, 2017
@c42f
Copy link
Owner

c42f commented Oct 4, 2017

Thanks, looks fine to me.

const FormatList& list);

private:
FormatList();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question actually. @nigels-com why did you add this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A FormatList default constructor looks like another place that ought to be doing initialisation.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default constructor is deleted because a nontrivial constructor was declared, so this should be unncessary. I'll remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to be explicit, IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants