Skip to content

Replace if with assert.#19

Open
pvc1989 wants to merge 1 commit intoKarypisLab:masterfrom
pvc1989:use-assert
Open

Replace if with assert.#19
pvc1989 wants to merge 1 commit intoKarypisLab:masterfrom
pvc1989:use-assert

Conversation

@pvc1989
Copy link
Contributor

@pvc1989 pvc1989 commented Sep 18, 2020

The only case for marker[qid] == 0 to be true is when elen == 0, which means the qid element has 0 node. So, the if clause will never be entered and can be safely replace by an assert statement, which can be turned off by setting the NDEBUG compiler flag.

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.

1 participant