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
commite4243679385bcf13dff0fc6a61b90d1a1774aa97 (patch)
tree15f488a650b9fb0180c95eff41727029073425fc /src/sortlist_type.h
parenta7761332f6c7170388d3f8542ef680e0f509735e (diff)
downloadopenttd-e4243679385bcf13dff0fc6a61b90d1a1774aa97.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;