Implementando uma linked list genérica que aceita dados de qualquer …#1
Open
nijek wants to merge 1 commit intoazolinmf:masterfrom
Open
Implementando uma linked list genérica que aceita dados de qualquer …#1nijek wants to merge 1 commit intoazolinmf:masterfrom
nijek wants to merge 1 commit intoazolinmf:masterfrom
Conversation
azolinmf
reviewed
Jan 17, 2023
| return -1; | ||
| } | ||
|
|
||
| int compareDouble(void *a, void *b) |
Owner
There was a problem hiding this comment.
What do you think about using the fabs() method? This would simplify this function
azolinmf
reviewed
Jan 17, 2023
| printf("%s ", (char *)data); | ||
| } | ||
|
|
||
| int compareChar(void *a, void *b) |
Owner
There was a problem hiding this comment.
Consider documenting what each return parameter means, e.g.
0 -> they are equal
1 and -1 > greater or lower
One option is using the @param tag
azolinmf
reviewed
Jan 17, 2023
| return -1; | ||
| } | ||
|
|
||
| int compareInt(void *a, void *b) |
Owner
There was a problem hiding this comment.
Same about the return documentation for all methods that this applies
azolinmf
approved these changes
Jan 17, 2023
Owner
azolinmf
left a comment
There was a problem hiding this comment.
Great PR! I've suggested a few improvements, feel free to adopt them before merging if they make sense to you (:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…data type
Pode usar qualquer tipo de dado, é só passar uma função que printe adequadamente o tipo de dado escolhido e que compare adequadamente o tipo de dado escolhido.