A few headers like BLI_math_constants.h and BLI_utildefines.h keep working for C code, for remaining makesdna and userdef defaults code in C. Pull Request: https://projects.blender.org/blender/blender/pulls/134406
40 lines
712 B
C
40 lines
712 B
C
/* SPDX-FileCopyrightText: 2013 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup bli
|
|
*/
|
|
|
|
/**
|
|
* \note keep \a sort_value first,
|
|
* so cmp functions can be reused.
|
|
*/
|
|
struct SortPtrByFloat {
|
|
float sort_value;
|
|
void *data;
|
|
};
|
|
|
|
struct SortIntByFloat {
|
|
float sort_value;
|
|
int data;
|
|
};
|
|
|
|
struct SortPtrByInt {
|
|
int sort_value;
|
|
void *data;
|
|
};
|
|
|
|
struct SortIntByInt {
|
|
int sort_value;
|
|
int data;
|
|
};
|
|
|
|
int BLI_sortutil_cmp_float(const void *a_, const void *b_);
|
|
int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_);
|
|
|
|
int BLI_sortutil_cmp_int(const void *a_, const void *b_);
|
|
int BLI_sortutil_cmp_int_reverse(const void *a_, const void *b_);
|