Skip to content

Check that full is not empty and assert#1753

Merged
wezrule merged 1 commit intonanocurrency:masterfrom
wezrule:circular_buffer_full_check
Feb 22, 2019
Merged

Check that full is not empty and assert#1753
wezrule merged 1 commit intonanocurrency:masterfrom
wezrule:circular_buffer_full_check

Conversation

@wezrule
Copy link
Copy Markdown
Contributor

@wezrule wezrule commented Feb 19, 2019

full is not checked as to whether it has any elements in before popping off the container, which I guess can happen in some circumstances as the comment above the function declaration states // Return nullptr if the container has stopped. I have added an assert to check for this as well as a precaution.

@wezrule wezrule added this to the V19.0 milestone Feb 19, 2019
@wezrule wezrule self-assigned this Feb 19, 2019
@wezrule wezrule requested a review from SergiySW February 19, 2019 20:24
Copy link
Copy Markdown
Contributor

@SergiySW SergiySW left a comment

Choose a reason for hiding this comment

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

Seems good after v18 release

@wezrule wezrule merged commit a0369e3 into nanocurrency:master Feb 22, 2019
@wezrule wezrule deleted the circular_buffer_full_check branch February 22, 2019 10:31
@zhyatt zhyatt added the quality improvements This item indicates the need for or supplies changes that improve maintainability label Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quality improvements This item indicates the need for or supplies changes that improve maintainability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants