Commit: 817fee305f57eebeb2c1e6e64b5e9c3806777f99
Author: Bastien Montagne
Date:   Thu Dec 17 13:21:18 2015 +0100
Branches: id-remap
https://developer.blender.org/rB817fee305f57eebeb2c1e6e64b5e9c3806777f99

Cleanup: mostly removes useless diff from master.

===================================================================

M       source/blender/blenkernel/BKE_font.h
M       source/blender/blenkernel/BKE_screen.h
M       source/blender/blenkernel/intern/brush.c
M       source/blender/blenkernel/intern/camera.c
M       source/blender/blenkernel/intern/curve.c
M       source/blender/blenkernel/intern/lamp.c
M       source/blender/blenkernel/intern/movieclip.c
M       source/blender/blenlib/BLI_array_utils.h
M       source/blender/blenlib/BLI_utildefines.h
M       source/blender/blenlib/intern/array_utils.c
M       source/blender/blenloader/BLO_readfile.h
M       source/blender/blenloader/intern/readfile.c
M       source/blender/editors/space_clip/space_clip.c
M       source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_font.h 
b/source/blender/blenkernel/BKE_font.h
index 76879e2..5dcc6f8 100644
--- a/source/blender/blenkernel/BKE_font.h
+++ b/source/blender/blenkernel/BKE_font.h
@@ -78,7 +78,7 @@ bool BKE_vfont_is_builtin(struct VFont *vfont);
 void BKE_vfont_builtin_register(void *mem, int size);
 
 void BKE_vfont_free_data(struct VFont *vfont);
-void BKE_vfont_free(struct VFont *sc);
+void BKE_vfont_free(struct VFont *sc); 
 void BKE_vfont_init(struct VFont *vfont);
 struct VFont *BKE_vfont_builtin_get(void);
 struct VFont *BKE_vfont_load(struct Main *bmain, const char *filepath);
diff --git a/source/blender/blenkernel/BKE_screen.h 
b/source/blender/blenkernel/BKE_screen.h
index e9b44f2..14e978b 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -311,7 +311,7 @@ float BKE_screen_view3d_zoom_to_fac(float camzoom);
 float BKE_screen_view3d_zoom_from_fac(float zoomfac);
 
 /* screen */
-void BKE_screen_free(struct bScreen *sc);
+void BKE_screen_free(struct bScreen *sc); 
 unsigned int BKE_screen_visible_layers(struct bScreen *screen, struct Scene 
*scene);
 
 #endif
diff --git a/source/blender/blenkernel/intern/brush.c 
b/source/blender/blenkernel/intern/brush.c
index e3dc533..4ebd35a 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -133,7 +133,7 @@ static void brush_defaults(Brush *brush)
 
 void BKE_brush_init(Brush *brush)
 {
-       BLI_assert(MEMCMP_NULL_STRUCT_OFS(brush, id));
+       BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(brush, id));
 
        /* enable fake user by default */
        id_fake_user_set(&brush->id);
diff --git a/source/blender/blenkernel/intern/camera.c 
b/source/blender/blenkernel/intern/camera.c
index 2019eaf..ccdcccf 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -59,7 +59,7 @@
 
 void BKE_camera_init(Camera *cam)
 {
-       BLI_assert(MEMCMP_NULL_STRUCT_OFS(cam, id));
+       BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(cam, id));
 
        cam->lens = 35.0f;
        cam->sensor_x = DEFAULT_SENSOR_WIDTH;
diff --git a/source/blender/blenkernel/intern/curve.c 
b/source/blender/blenkernel/intern/curve.c
index cde1af5..723d87f 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -129,7 +129,7 @@ void BKE_curve_free(Curve *cu)
 
 void BKE_curve_init(Curve *cu)
 {
-       /* BLI_assert(MEMCMP_NULL_STRUCT_OFS(cu, id)); */  /* cu->type is 
already initialized... */
+       /* BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(cu, id)); */  /* cu->type is 
already initialized... */
 
        copy_v3_fl(cu->size, 1.0f);
        cu->flag = CU_FRONT | CU_BACK | CU_DEFORM_BOUNDS_OFF | CU_PATH_RADIUS;
diff --git a/source/blender/blenkernel/intern/lamp.c 
b/source/blender/blenkernel/intern/lamp.c
index 12c6f5a..7fcbd9c 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -55,7 +55,7 @@
 
 void BKE_lamp_init(Lamp *la)
 {
-       BLI_assert(MEMCMP_NULL_STRUCT_OFS(la, id));
+       BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(la, id));
 
        la->r = la->g = la->b = la->k = 1.0f;
        la->haint = la->energy = 1.0f;
diff --git a/source/blender/blenkernel/intern/movieclip.c 
b/source/blender/blenkernel/intern/movieclip.c
index e75f579..e182f18 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1413,7 +1413,7 @@ void BKE_movieclip_build_proxy_frame_for_ibuf(MovieClip 
*clip, ImBuf *ibuf, stru
        }
 }
 
-/** Free (or release) any data used by this lamp (does not free the lamp 
itself). */
+/** Free (or release) any data used by this movie clip (does not free the clip 
itself). */
 void BKE_movieclip_free(MovieClip *clip)
 {
        /* Also frees animdata. */
diff --git a/source/blender/blenlib/BLI_array_utils.h 
b/source/blender/blenlib/BLI_array_utils.h
index 36d9b2f..ff7976d 100644
--- a/source/blender/blenlib/BLI_array_utils.h
+++ b/source/blender/blenlib/BLI_array_utils.h
@@ -46,6 +46,4 @@ int _bli_array_findindex(const void *arr, unsigned int 
arr_len, size_t arr_strid
 #define BLI_array_findindex(arr, arr_len, p) \
        _bli_array_findindex(arr, arr_len, sizeof(*(arr)), p)
 
-int BLI_memcmp_null(char *p, const size_t size);
-
 #endif  /* __BLI_ARRAY_UTILS_H__ */
diff --git a/source/blender/blenlib/BLI_utildefines.h 
b/source/blender/blenlib/BLI_utildefines.h
index 52d269a..31852fa 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -695,15 +695,6 @@ extern void BLI_system_backtrace(FILE *fp);
 #  define UNLIKELY(x)     (x)
 #endif
 
-/* XXX Defined in array_utils.c for now. I do not know where we should put it 
actually... */
-extern int BLI_memcmp_null(char *p, const size_t size);
-
-#define MEMCMP_NULL_STRUCT_OFS(struct_var, member) \
-       (BLI_memcmp_null( \
-              (char *)(struct_var)  + OFFSETOF_STRUCT(struct_var, member), \
-              sizeof(*(struct_var)) - OFFSETOF_STRUCT(struct_var, member)) == 
0)
-
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenlib/intern/array_utils.c 
b/source/blender/blenlib/intern/array_utils.c
index 6c0fc4e..cef912e 100644
--- a/source/blender/blenlib/intern/array_utils.c
+++ b/source/blender/blenlib/intern/array_utils.c
@@ -142,16 +142,3 @@ int _bli_array_findindex(const void *arr, unsigned int 
arr_len, size_t arr_strid
        }
        return -1;
 }
-
-/* XXX Don't know where to put this... */
-int BLI_memcmp_null(char *p, const size_t size) {
-       const char null_buff[4096] = {0};
-       char *null = (char *)null_buff;
-
-       if (UNLIKELY((size) > 4096)) {
-               null = alloca(sizeof(*null) * size);
-               memset(null, 0, sizeof(*null) * size);
-       }
-
-       return memcmp(p, null, size);
-}
diff --git a/source/blender/blenloader/BLO_readfile.h 
b/source/blender/blenloader/BLO_readfile.h
index 0d13302..cb06b5d 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -99,7 +99,7 @@ struct Main *BLO_library_link_begin(struct Main *mainvar, 
BlendHandle **bh, cons
 struct ID *BLO_library_link_named_part(struct Main *mainl, BlendHandle **bh, 
const short idcode, const char *name);
 struct ID *BLO_library_link_named_part_ex(
         struct Main *mainl, BlendHandle **bh,
-        const int idcode, const char *name, const short flag,
+        const short idcode, const char *name, const short flag,
         struct Scene *scene, struct View3D *v3d,
         const bool use_placeholders, const bool force_indirect);
 void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, 
struct Scene *scene, struct View3D *v3d);
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index dd6a350..5097bf2 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9694,7 +9694,7 @@ void BLO_library_link_all(Main *mainl, BlendHandle *bh)
 }
 
 static ID *link_named_part_ex(
-        Main *mainl, FileData *fd, const int idcode, const char *name, const 
short flag,
+        Main *mainl, FileData *fd, const short idcode, const char *name, const 
short flag,
                Scene *scene, View3D *v3d, const bool use_placeholders, const 
bool force_indirect)
 {
        ID *id = link_named_part(mainl, fd, idcode, name, use_placeholders, 
force_indirect);
@@ -9767,8 +9767,10 @@ ID *BLO_library_link_named_part(Main *mainl, BlendHandle 
**bh, const short idcod
  * \return the linked ID when found.
  */
 ID *BLO_library_link_named_part_ex(
-        Main *mainl, BlendHandle **bh, const int idcode, const char *name, 
const short flag,
-        Scene *scene, View3D *v3d, const bool use_placeholders, const bool 
force_indirect)
+        Main *mainl, BlendHandle **bh,
+        const short idcode, const char *name, const short flag,
+        Scene *scene, View3D *v3d,
+        const bool use_placeholders, const bool force_indirect)
 {
        FileData *fd = (FileData*)(*bh);
        return link_named_part_ex(mainl, fd, idcode, name, flag, scene, v3d, 
use_placeholders, force_indirect);
diff --git a/source/blender/editors/space_clip/space_clip.c 
b/source/blender/editors/space_clip/space_clip.c
index 101dc22..9164869 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1523,7 +1523,6 @@ static void clip_id_remap(ScrArea *UNUSED(sa), SpaceLink 
*slink, ID *old_id, ID
        }
 }
 
-
 /* only called once, from space/spacetypes.c */
 void ED_spacetype_clip(void)
 {
diff --git a/source/blender/windowmanager/intern/wm_operators.c 
b/source/blender/windowmanager/intern/wm_operators.c
index 89fe923..cbd902c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2714,7 +2714,7 @@ static void wm_link_do(
        BlendHandle *bh;
        Library *lib;
 
-       const short flag = lapp_data->flag;
+       const int flag = lapp_data->flag;
 
        LinkNode *liblink, *itemlink;
        int lib_idx, item_idx;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to