diff options
author | smatz <smatz@openttd.org> | 2008-05-27 00:13:51 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-05-27 00:13:51 +0000 |
commit | e4243679385bcf13dff0fc6a61b90d1a1774aa97 (patch) | |
tree | 15f488a650b9fb0180c95eff41727029073425fc /src/sortlist_type.h | |
parent | a7761332f6c7170388d3f8542ef680e0f509735e (diff) | |
download | openttd-e4243679385bcf13dff0fc6a61b90d1a1774aa97.tar.xz |
(svn r13280) -Fix (r13276): MSVC compilation was broken
Diffstat (limited to 'src/sortlist_type.h')
-rw-r--r-- | src/sortlist_type.h | 6 |
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; |