ClangFormat: apply to source, most of intern

Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
This commit is contained in:
2019-04-17 06:17:24 +02:00
parent b3dabc200a
commit e12c08e8d1
4481 changed files with 1230080 additions and 1155401 deletions

View File

@@ -18,7 +18,6 @@
* \ingroup pymathutils
*/
#ifndef __MATHUTILS_MATRIX_H__
#define __MATHUTILS_MATRIX_H__
@@ -33,23 +32,25 @@ extern PyTypeObject matrix_access_Type;
/* matrix[row][col] == MATRIX_ITEM_INDEX(matrix, row, col) */
#ifdef DEBUG
# define MATRIX_ITEM_ASSERT(_mat, _row, _col) (BLI_assert(_row < (_mat)->num_row && _col < (_mat)->num_col))
# define MATRIX_ITEM_ASSERT(_mat, _row, _col) \
(BLI_assert(_row < (_mat)->num_row && _col < (_mat)->num_col))
#else
# define MATRIX_ITEM_ASSERT(_mat, _row, _col) (void)0
#endif
#define MATRIX_ITEM_INDEX_NUMROW(_totrow, _row, _col) (((_totrow) * (_col)) + (_row))
#define MATRIX_ITEM_INDEX(_mat, _row, _col) (MATRIX_ITEM_ASSERT(_mat, _row, _col),(((_mat)->num_row * (_col)) + (_row)))
#define MATRIX_ITEM_PTR( _mat, _row, _col) ((_mat)->matrix + MATRIX_ITEM_INDEX(_mat, _row, _col))
#define MATRIX_ITEM( _mat, _row, _col) ((_mat)->matrix [MATRIX_ITEM_INDEX(_mat, _row, _col)])
#define MATRIX_ITEM_INDEX(_mat, _row, _col) \
(MATRIX_ITEM_ASSERT(_mat, _row, _col), (((_mat)->num_row * (_col)) + (_row)))
#define MATRIX_ITEM_PTR(_mat, _row, _col) ((_mat)->matrix + MATRIX_ITEM_INDEX(_mat, _row, _col))
#define MATRIX_ITEM(_mat, _row, _col) ((_mat)->matrix[MATRIX_ITEM_INDEX(_mat, _row, _col)])
#define MATRIX_COL_INDEX(_mat, _col) (MATRIX_ITEM_INDEX(_mat, 0, _col))
#define MATRIX_COL_PTR( _mat, _col) ((_mat)->matrix + MATRIX_COL_INDEX(_mat, _col))
#define MATRIX_COL_PTR(_mat, _col) ((_mat)->matrix + MATRIX_COL_INDEX(_mat, _col))
typedef struct {
BASE_MATH_MEMBERS(matrix);
unsigned short num_col;
unsigned short num_row;
BASE_MATH_MEMBERS(matrix);
unsigned short num_col;
unsigned short num_row;
} MatrixObject;
/* struct data contains a pointer to the actual data that the
@@ -58,21 +59,20 @@ typedef struct {
* blender (stored in blend_data). This is an either/or struct not both */
/* prototypes */
PyObject *Matrix_CreatePyObject(
const float *mat,
const unsigned short num_col, const unsigned short num_row,
PyTypeObject *base_type
) ATTR_WARN_UNUSED_RESULT;
PyObject *Matrix_CreatePyObject_wrap(
float *mat,
const unsigned short num_col, const unsigned short num_row,
PyTypeObject *base_type
) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
PyObject *Matrix_CreatePyObject_cb(
PyObject *user,
const unsigned short num_col, const unsigned short num_row,
unsigned char cb_type, unsigned char cb_subtype
) ATTR_WARN_UNUSED_RESULT;
PyObject *Matrix_CreatePyObject(const float *mat,
const unsigned short num_col,
const unsigned short num_row,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
PyObject *Matrix_CreatePyObject_wrap(float *mat,
const unsigned short num_col,
const unsigned short num_row,
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
PyObject *Matrix_CreatePyObject_cb(PyObject *user,
const unsigned short num_col,
const unsigned short num_row,
unsigned char cb_type,
unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
/* PyArg_ParseTuple's "O&" formatting helpers. */
int Matrix_ParseAny(PyObject *o, void *p);