-
Notifications
You must be signed in to change notification settings - Fork 1
Implementando uma linked list genérica que aceita dados de qualquer … #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| return -1; | ||
| } | ||
|
|
||
| int compareDouble(void *a, void *b) |
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.
What do you think about using the fabs() method? This would simplify this function
| printf("%s ", (char *)data); | ||
| } | ||
|
|
||
| int compareChar(void *a, void *b) |
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.
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
| return -1; | ||
| } | ||
|
|
||
| int compareInt(void *a, void *b) |
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.
Same about the return documentation for all methods that this applies
azolinmf
left a comment
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.
Great PR! I've suggested a few improvements, feel free to adopt them before merging if they make sense to you (:
…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.