diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-19 12:00:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-19 12:00:20 +0400 |
commit | f8278e5479a56d7742e820821ab16c5c3c3fab75 (patch) | |
tree | 795b0691f56091a998fee80c5cdaf751c6ebe7a2 | |
parent | 875aff2a9a832d162141e1f6a39f9d08c46912b7 (diff) |
Correct ARRAY_SIZE macro and make doxy comments consistent
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 74e380c7d50..4bd6d284343 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -1161,9 +1161,9 @@ void BKE_mesh_loops_to_mface_corners( /** * Convert all CD layers from loop/poly to tessface data. * - * @loopindices is an array of an int[4] per tessface, mapping tessface's verts to loops indices. + * \param loopindices is an array of an int[4] per tessface, mapping tessface's verts to loops indices. * - * Note when mface is not NULL, mface[face_index].v4 is used to test quads, else, loopindices[face_index][3] is used. + * \note when mface is not NULL, mface[face_index].v4 is used to test quads, else, loopindices[face_index][3] is used. */ void BKE_mesh_loops_to_tessdata(CustomData *fdata, CustomData *ldata, CustomData *pdata, MFace *mface, int *polyindices, unsigned int (*loopindices)[4], const int num_faces) @@ -1246,7 +1246,7 @@ void BKE_mesh_loops_to_tessdata(CustomData *fdata, CustomData *ldata, CustomData /** * Recreate tessellation. * - * @do_face_nor_copy controls whether the normals from the poly are copied to the tessellated faces. + * \param do_face_nor_copy controls whether the normals from the poly are copied to the tessellated faces. * * \return number of tessellation faces. */ diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 20ed2e06714..af192d13369 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -362,12 +362,12 @@ } (void)0 /* assuming a static array */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__cplusplus) # define ARRAY_SIZE(arr) \ ((sizeof(struct {int isnt_array : ((void *)&(arr) == &(arr)[0]);}) * 0) + \ (sizeof(arr) / sizeof(*(arr)))) #else -# define ARRAY_SIZE(x) sizeof(arr) / sizeof(*(arr)) +# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr))) #endif /* Warning-free macros for storing ints in pointers. Use these _only_ diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 57be15f23fb..f7a4308c167 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -942,10 +942,10 @@ static void image_open_cancel(bContext *UNUSED(C), wmOperator *op) } /** - * @brief Get a list of frames from the list of image files matching the first file name sequence pattern - * @param ptr [in] the RNA pointer containing the "directory" entry and "files" collection - * @param frames [out] the list of frame numbers found in the files matching the first one by name - * @param path [out] the full path of the first file in the list of image files + * \brief Get a list of frames from the list of image files matching the first file name sequence pattern + * \param ptr [in] the RNA pointer containing the "directory" entry and "files" collection + * \param frames [out] the list of frame numbers found in the files matching the first one by name + * \param path [out] the full path of the first file in the list of image files */ static void image_sequence_get_frames(PointerRNA *ptr, ListBase *frames, char *path, const size_t maxlen) { @@ -1000,10 +1000,10 @@ static int image_cmp_frame(void *a, void *b) } /** - * @brief Return the start (offset) and the length of the sequence of continuous frames in the list of frames - * @param frames [in] the list of frame numbers, as a side-effect the list is sorted - * @param ofs [out] offest, the first frame number in the sequence - * @return the number of continuos frames in the sequence + * \brief Return the start (offset) and the length of the sequence of continuous frames in the list of frames + * \param frames [in] the list of frame numbers, as a side-effect the list is sorted + * \param ofs [out] offest, the first frame number in the sequence + * \return the number of continuos frames in the sequence */ static int image_sequence_get_len(ListBase *frames, int *ofs) { diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 8ef1d0bef99..953777ff329 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3100,7 +3100,7 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode, b IMB_display_buffer_release(cache_handle); } - /** @note draw selected info on backdrop */ + /** \note draw selected info on backdrop */ if (snode->edittree) { bNode *node = snode->edittree->nodes.first; rctf *viewer_border = &snode->nodetree->viewer_border; |