Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11modes.c @ 91:e85e03f195b4
From: "Markus F.X.J. Oberhumer"
Subject: SDL CVS patches
below you will find some small patches against the
current SDL CVS.
It adresses these things:
1) Use "&" instead of "%" in some cases. For negative
signed integers (x % 8) is not always (x & 7),
and the compiler can produce slightly faster
code when using "&" here.
2) Some const issues.
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sat, 07 Jul 2001 20:20:17 +0000 |
parents | ee1f71c10889 |
children | 8a5aff5c1294 |
comparison
equal
deleted
inserted
replaced
90:ee1f71c10889 | 91:e85e03f195b4 |
---|---|
76 #endif | 76 #endif |
77 | 77 |
78 #ifdef XFREE86_VM | 78 #ifdef XFREE86_VM |
79 static int cmpmodes(const void *va, const void *vb) | 79 static int cmpmodes(const void *va, const void *vb) |
80 { | 80 { |
81 XF86VidModeModeInfo *a = *(XF86VidModeModeInfo**)va; | 81 const XF86VidModeModeInfo *a = *(const XF86VidModeModeInfo**)va; |
82 XF86VidModeModeInfo *b = *(XF86VidModeModeInfo**)vb; | 82 const XF86VidModeModeInfo *b = *(const XF86VidModeModeInfo**)vb; |
83 if(a->hdisplay > b->hdisplay) | 83 if(a->hdisplay > b->hdisplay) |
84 return -1; | 84 return -1; |
85 return b->vdisplay - a->vdisplay; | 85 return b->vdisplay - a->vdisplay; |
86 } | 86 } |
87 #endif | 87 #endif |