Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-28 10:43:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-28 10:43:04 +0400
commit0b9be7059183fd7b4e8b567aeab5fec0cab1f999 (patch)
treea6b31f9422c540381e68391f3044f481358c7b38 /source
parent71e7f9028f683b39fcdb0549da908751bce2e4d2 (diff)
typo's and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN when invalid args are given.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/intern/string.c6
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h6
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c2
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
10 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 14e0dc2f049..f23f75f69d9 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -85,6 +85,10 @@ size_t BLI_vsnprintf(char *__restrict buffer, size_t count, const char *__restri
{
size_t n;
+ BLI_assert(buffer != NULL);
+ BLI_assert(count > 0);
+ BLI_assert(format != NULL);
+
n = vsnprintf(buffer, count, format, arg);
if (n != -1 && n < count) {
@@ -115,6 +119,8 @@ char *BLI_sprintfN(const char *__restrict format, ...)
va_list arg;
char *n;
+ BLI_assert(format != NULL);
+
va_start(arg, format);
ds = BLI_dynstr_new();
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 02283aa6e28..7c054d84405 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -878,7 +878,7 @@ static void bm_decim_edge_collapse(BMesh *bm, BMEdge *e,
int i;
if (vweights) {
- vweights[BM_elem_index_get(v_other)] = vweights[v_clear_index] + vweights[BM_elem_index_get(v_other)];
+ vweights[BM_elem_index_get(v_other)] += vweights[v_clear_index];
}
e = NULL; /* paranoid safety check */
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index c7a7d06134e..00104c24194 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -193,7 +193,7 @@ private:
/**
* @brief try to schedule a specific chunk.
- * @note scheduling succeeds when all input requirements are met and the chunks hasen't been scheduled yet.
+ * @note scheduling succeeds when all input requirements are met and the chunks hasn't been scheduled yet.
* @param graph
* @param xChunk
* @param yChunk
@@ -245,7 +245,7 @@ public:
/**
* @brief add an operation to this ExecutionGroup
- * @note this method will add input of the operations recursivly
+ * @note this method will add input of the operations recursively
* @note this method can create multiple ExecutionGroup's
* @param system
* @param operation
@@ -369,7 +369,7 @@ public:
/**
* @brief this method determines the MemoryProxy's where this execution group depends on.
* @note After this method determineDependingAreaOfInterest can be called to determine
- * @note the area of the MemoryProxy.creator thas has to be executed.
+ * @note the area of the MemoryProxy.creator that has to be executed.
* @param memoryProxies result
*/
void determineDependingMemoryProxies(vector<MemoryProxy *> *memoryProxies);
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 62eabd98aee..dec45b7f326 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -332,7 +332,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
smoothness, 0.0f, 0.0f,
cuts,
SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE,
- use_only_quads, 0);
+ use_only_quads, 0);
/* force edge slide to edge select mode in in face select mode */
if (em->selectmode & SCE_SELECT_FACE) {
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index d3a4c951e06..2ecc20b2ddb 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -60,7 +60,7 @@
*
* \param inset is used so we get some useful distance
* when comparing multiple edges that meet at the same
- * point and would result in teh same distance.
+ * point and would result in the same distance.
*/
#define INSET_DEFAULT 0.00001f
static float edbm_rip_edgedist(ARegion *ar, float mat[][4],
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 676f033af32..a929c3ef585 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -656,7 +656,7 @@ static float VecZDepthPersp(const float pt[2],
* barycentric_weights_v2 would return, in this case its easiest just to
* undo the 4th axis division and make it unit-sum
*
- * don't call barycentric_weights_v2() becaue our callers expect 'w'
+ * don't call barycentric_weights_v2() because our callers expect 'w'
* to be weighted from the perspective */
w_tmp[0] = w[0] * v1[3];
w_tmp[1] = w[1] * v2[3];
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index af890a81ad6..e6910280da4 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -133,7 +133,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
/* XXX - THIS FUNCTION IS INCREDIBLY SLOW
- * ... it can bring blenders tools and viewport to a grinding halt becuase of searching
+ * ... it can bring blenders tools and viewport to a grinding halt because of searching
* for duplicate items every times they are added.
*
* TODO (possible speedups)
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 1cf01bc1bbc..51efa2b0e40 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -938,7 +938,7 @@ static short pose_grab_with_ik(Object *ob)
}
/* iTaSC needs clear for new IK constraints */
- if(tot_ik)
+ if (tot_ik)
BIK_clear_data(ob->pose);
return (tot_ik) ? 1 : 0;
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
index efe07b2c48c..507d54d7526 100644
--- a/source/blender/ikplugin/intern/ikplugin_api.c
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -86,7 +86,7 @@ static IKPlugin ikplugin_tab[] = {
static IKPlugin *get_plugin(bPose *pose)
{
- if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab)/sizeof(IKPlugin) - 2))
+ if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab) / sizeof(IKPlugin) - 2))
return NULL;
return &ikplugin_tab[pose->iksolver];
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c64cb339445..9968d81e7b4 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1215,7 +1215,7 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_
/* if we don't have global undo, we can't do undo push for automatic redo,
* so we require manual OK clicking in this popup */
- if(!(U.uiflag & USER_GLOBALUNDO))
+ if (!(U.uiflag & USER_GLOBALUNDO))
return WM_operator_props_dialog_popup(C, op, 300, UI_UNIT_Y);
ED_undo_push_op(C, op);