فهرست منبع

docs: Fixed example code for SDL_qsort_r() and SDL_bsearch_r().

Ryan C. Gordon 5 ماه پیش
والد
کامیت
eed11ad6d6
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      include/SDL3/SDL_stdinc.h

+ 4 - 4
include/SDL3/SDL_stdinc.h

@@ -1355,9 +1355,9 @@ typedef int (SDLCALL *SDL_CompareCallback_r)(void *userdata, const void *a, cons
  *     const data *A = (const data *)a;
  *     const data *B = (const data *)b;
  *
- *     if (A->n < B->n) {
+ *     if (A->key < B->key) {
  *         return (method == sort_increasing) ? -1 : 1;
- *     } else if (B->n < A->n) {
+ *     } else if (B->key < A->key) {
  *         return (method == sort_increasing) ? 1 : -1;
  *     } else {
  *         return 0;
@@ -1407,9 +1407,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_qsort_r(void *base, size_t nmemb, size_t si
  *     const data *A = (const data *)a;
  *     const data *B = (const data *)b;
  *
- *     if (A->n < B->n) {
+ *     if (A->key < B->key) {
  *         return (method == sort_increasing) ? -1 : 1;
- *     } else if (B->n < A->n) {
+ *     } else if (B->key < A->key) {
  *         return (method == sort_increasing) ? 1 : -1;
  *     } else {
  *         return 0;