Fixed compiler warning
This commit is contained in:
@ -28,16 +28,14 @@ void cardHandSort(card_t *cards, uint8_t length) {
|
||||
arraySort(sizeof(card_t), cards, (int32_t)length, &_cardSorter);
|
||||
}
|
||||
|
||||
int32_t _cardSorter(void *left, void *right) {
|
||||
int32_t _cardSorter(const void* left, const void* right) {
|
||||
card_t cardL = *((card_t *)left);
|
||||
card_t cardR = *((card_t *)right);
|
||||
|
||||
uint8_t suitL = cardGetSuit(cardL);
|
||||
uint8_t suitR = cardGetSuit(cardR);
|
||||
|
||||
if(suitL != suitR) return suitL - suitR;
|
||||
|
||||
|
||||
uint8_t numberL = cardGetNumber(cardL);
|
||||
uint8_t numberR = cardGetNumber(cardR);
|
||||
|
||||
|
@ -43,4 +43,4 @@ void cardDeal(card_t *source, uint8_t *sourceSize, card_t *dest,
|
||||
*/
|
||||
void cardHandSort(card_t *cards, uint8_t length);
|
||||
|
||||
int32_t _cardSorter(void *left, void *right);
|
||||
int32_t _cardSorter(const void* left, const void* right);
|
Reference in New Issue
Block a user