Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change! However, I think we need to go the other way. Here is the full story:
0 - 3
(representingA
,C
,G
,T
correspondingly) for input of0
,1
,2
,4
(converting single-bit mask to a nucleotide)-1
's represent the impossible values, but still they should be as initializers.So, the return type should really be
char
as it is used later on inGetUniqueOutgoing
/GetUniqueIncoming
.I would probably use
0xFF
instead of-1
. Does this work for you on aarch64-linux? To make things explicit we can even do something like:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! That works too!
Let me update the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it but I have the feeling that more changes are needed at the call sites of
GetUniqueOutgoing
/GetUniqueIncoming
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callsites should be fine. The contract is that one should never call
GetUniqueOutgoing
/GetUniqueIncoming
if they could return0xFF
.