summaryrefslogtreecommitdiff
path: root/src/sortlist_type.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-05-27 00:13:51 +0000
committersmatz <smatz@openttd.org>2008-05-27 00:13:51 +0000
commit33dc3165beaef6b91d52d76d4497445ca4a04211 (patch)
tree15f488a650b9fb0180c95eff41727029073425fc /src/sortlist_type.h
parent691bf297246282158b46fb03793a42f393030fc1 (diff)
downloadopenttd-33dc3165beaef6b91d52d76d4497445ca4a04211.tar.xz
(svn r13280) -Fix (r13276): MSVC compilation was broken
Diffstat (limited to 'src/sortlist_type.h')
-rw-r--r--src/sortlist_type.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sortlist_type.h b/src/sortlist_type.h
index 0d681eb39..7ae99dd6b 100644
--- a/src/sortlist_type.h
+++ b/src/sortlist_type.h
@@ -26,7 +26,7 @@ struct Listing {
template <typename T>
class GUIList : public SmallVector<T, 32> {
public:
- typedef int SortFunction(const T*, const T*);
+ typedef int CDECL SortFunction(const T*, const T*);
public: // Temporary: public for conversion only
SortFunction* const *func_list; ///< The sort criteria functions
@@ -189,7 +189,7 @@ public:
*
* @param compare The function to compare two list items
* */
- FORCEINLINE void Sort(SortFunction compare)
+ FORCEINLINE void Sort(SortFunction *compare)
{
/* Do not sort if the resort bit is not set */
if (!HASBITS(this->flags, VL_RESORT)) return;
@@ -204,7 +204,7 @@ public:
const bool desc = HASBITS(this->flags, VL_DESC);
if (HASBITS(this->flags, VL_FIRST_SORT)) {
- qsort(this->data, this->items, sizeof(T), (int (*)(const void *a, const void *b))compare);
+ qsort(this->data, this->items, sizeof(T), (int (CDECL *)(const void *, const void *))compare);
if (desc) this->Reverse();
return;