[Bf-blender-cvs] [a7869ba] missing-libs: Minor changes & sync with master

Campbell Barton noreply at git.blender.org
Tue Oct 20 11:24:56 CEST 2015


Commit: a7869babcd4de7c82bfe5ceebbdd30afcc3a999d
Author: Campbell Barton
Date:   Tue Oct 20 20:11:06 2015 +1100
Branches: missing-libs
https://developer.blender.org/rBa7869babcd4de7c82bfe5ceebbdd30afcc3a999d

Minor changes & sync with master

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

M	source/blender/blenkernel/BKE_font.h
M	source/blender/blenkernel/intern/lamp.c
M	source/blender/blenkernel/intern/lattice.c
M	source/blender/blenkernel/intern/mball.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/text.c
M	source/blender/blenkernel/intern/world.c
M	source/blender/blenlib/BLI_array_utils.h
M	source/blender/blenlib/BLI_memory_utils.h
M	source/blender/blenlib/BLI_utildefines.h
M	source/blender/blenlib/intern/memory_utils.c
M	source/blender/blenloader/intern/readfile.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/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index 46b0ad8..8e35089 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -96,16 +96,16 @@ void BKE_lamp_init(Lamp *la)
 	la->sky_colorspace = BLI_XYZ_CIE;
 	la->sky_exposure = 1.0f;
 	la->shadow_frustum_size = 10.0f;
-
+	
 	curvemapping_initialize(la->curfalloff);
 }
 
 Lamp *BKE_lamp_add(Main *bmain, const char *name)
 {
 	Lamp *la;
-	
+
 	la =  BKE_libblock_alloc(bmain, ID_LA, name);
-	
+
 	BKE_lamp_init(la);
 
 	return la;
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 0240a46..0e5228a 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -256,9 +256,9 @@ void BKE_lattice_init(Lattice *lt)
 	BLI_assert(MEMCMP_STRUCT_OFS_IS_ZERO(lt, id));
 
 	lt->flag = LT_GRID;
-
+	
 	lt->typeu = lt->typev = lt->typew = KEY_BSPLINE;
-
+	
 	lt->def = MEM_callocN(sizeof(BPoint), "lattvert"); /* temporary */
 	BKE_lattice_resize(lt, 2, 2, 2, NULL);  /* creates a uniform lattice */
 	lt->actbp = LT_ACTBP_NONE;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index d3f7fd7..bd9fd33 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -97,7 +97,7 @@ void BKE_mball_init(MetaBall *mb)
 
 	mb->size[0] = mb->size[1] = mb->size[2] = 1.0;
 	mb->texflag = MB_AUTOSPACE;
-
+	
 	mb->wiresize = 0.4f;
 	mb->rendersize = 0.2f;
 	mb->thresh = 0.6f;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 799696c..ffb614f 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1058,7 +1058,7 @@ Object *BKE_object_add_only_object(Main *bmain, int type, const char *name)
 
 	/* default object vars */
 	ob->type = type;
-	
+
 	BKE_object_init(ob);
 
 	return ob;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 80d15ce..6e41ed3 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -191,15 +191,15 @@ void BKE_text_init(Text *ta)
 	tmp = (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
 	tmp->line = (char *) MEM_mallocN(1, "textline_string");
 	tmp->format = NULL;
-
+	
 	tmp->line[0] = 0;
 	tmp->len = 0;
-
+				
 	tmp->next = NULL;
 	tmp->prev = NULL;
-
+				
 	BLI_addhead(&ta->lines, tmp);
-
+	
 	ta->curl = ta->lines.first;
 	ta->curc = 0;
 	ta->sell = ta->lines.first;
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index e076094..88c98b6 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -33,7 +33,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <math.h>
-
 #include "MEM_guardedalloc.h"
 
 #include "DNA_world_types.h"
@@ -109,7 +108,7 @@ void BKE_world_init(World *wrld)
 	wrld->aobias = 0.05f;
 	wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
 	wrld->ao_approx_error = 0.25f;
-
+	
 	wrld->preview = NULL;
 	wrld->miststa = 5.0f;
 	wrld->mistdist = 25.0f;
diff --git a/source/blender/blenlib/BLI_array_utils.h b/source/blender/blenlib/BLI_array_utils.h
index 6e7ee3b..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)
 
-bool BLI_array_is_zero(const void *arr, const size_t size);
-
 #endif  /* __BLI_ARRAY_UTILS_H__ */
diff --git a/source/blender/blenlib/BLI_memory_utils.h b/source/blender/blenlib/BLI_memory_utils.h
index ab2542c..32bbdf8 100644
--- a/source/blender/blenlib/BLI_memory_utils.h
+++ b/source/blender/blenlib/BLI_memory_utils.h
@@ -31,4 +31,4 @@
 bool BLI_memory_is_zero(const void *arr, const size_t size);
 #endif
 
-#endif  /* __BLI_ARRAY_UTILS_H__ */
+#endif  /* __BLI_MEMORY_UTILS_H__ */
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index fb94a22..31852fa 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -514,7 +514,7 @@ extern "C" {
 } (void)0
 
 /* defined
- * in array_utils.c for now. I do not know where we should put it actually... */
+ * in memory_utils.c for now. I do not know where we should put it actually... */
 #ifndef __BLI_MEMORY_UTILS_H__
 extern bool BLI_memory_is_zero(const void *arr, const size_t arr_size);
 #endif
diff --git a/source/blender/blenlib/intern/memory_utils.c b/source/blender/blenlib/intern/memory_utils.c
index b17c6ff..2ebb8be 100644
--- a/source/blender/blenlib/intern/memory_utils.c
+++ b/source/blender/blenlib/intern/memory_utils.c
@@ -26,7 +26,6 @@
  * such as ``memcpy`` & ``memcmp``.
  */
 #include <string.h>
-#include <stdlib.h>
 
 #include "BLI_sys_types.h"
 #include "BLI_utildefines.h"
@@ -36,16 +35,16 @@
 #include "BLI_strict_flags.h"
 
 /**
- * Check if memory is zero'd, as with memset(arr, 0, arr_size)
+ * Check if memory is zero'd, as with memset(s, 0, nbytes)
  */
-bool BLI_memory_is_zero(const void *arr, const size_t arr_size)
+bool BLI_memory_is_zero(const void *s, const size_t nbytes)
 {
-	const char *arr_byte = arr;
-	const char *arr_end = (char *)arr + arr_size;
+	const char *s_byte = s;
+	const char *s_end = (const char *)s + nbytes;
 
-	while ((arr_byte != arr_end) && (*arr_byte == 0)) {
-		arr_byte++;
+	while ((s_byte != s_end) && (*s_byte == 0)) {
+		s_byte++;
 	}
 
-	return (arr_byte == arr_end);
+	return (s_byte == s_end);
 }
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b3b0ee4..dda5c11 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9794,12 +9794,12 @@ static void link_id_part(ReportList *reports, FileData *fd, Main *mainvar, ID *i
 	}
 	else {
 		blo_reportf_wrap(
-				reports, RPT_WARNING,
-				TIP_("LIB ERROR: %s: '%s' missing from '%s', parent '%s'"),
-				BKE_idcode_to_name(GS(id->name)),
-				id->name + 2,
-				mainvar->curlib->filepath,
-				library_parent_filepath(mainvar->curlib));
+		        reports, RPT_WARNING,
+		        TIP_("LIB ERROR: %s: '%s' missing from '%s', parent '%s'"),
+		        BKE_idcode_to_name(GS(id->name)),
+		        id->name + 2,
+		        mainvar->curlib->filepath,
+		        library_parent_filepath(mainvar->curlib));
 
 		/* Generate a placeholder for this ID (simplified version of read_libblock actually...). */
 		if (r_id) {




More information about the Bf-blender-cvs mailing list