diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-23 14:51:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-23 14:52:33 +0300 |
commit | b8a6cd0140cae6d4da1d17577f60dc7b854fdff1 (patch) | |
tree | 0791fbe37027c9545870d624540dc422c9c05ca5 | |
parent | c48ebb44ae15b1238a6d86e98fee6cd1ff0cba73 (diff) |
Cleanup: comments, style
-rw-r--r-- | source/blender/blenkernel/intern/bpath.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_ghash.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_linklist.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_color_inline.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 |
10 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 3488cff7315..e94f30da0c5 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -393,7 +393,7 @@ static bool rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *a } if (visit_cb(userdata, path_dst, path_src)) { - MEM_freeN((*path)); + MEM_freeN(*path); (*path) = BLI_strdup(path_dst); return true; } diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index cd86bb831f4..f2705c79574 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -298,14 +298,14 @@ static void ghash_buckets_contract( #ifdef GHASH_USE_MODULO_BUCKETS while ((nentries < gh->limit_shrink) && - (gh->cursize > gh->size_min)) + (gh->cursize > gh->size_min)) { new_nbuckets = hashsizes[--gh->cursize]; gh->limit_shrink = GHASH_LIMIT_SHRINK(new_nbuckets); } #else while ((nentries < gh->limit_shrink) && - (gh->bucket_bit > gh->bucket_bit_min)) + (gh->bucket_bit > gh->bucket_bit_min)) { new_nbuckets = 1u << --gh->bucket_bit; gh->limit_shrink = GHASH_LIMIT_SHRINK(new_nbuckets); @@ -525,7 +525,7 @@ static Entry *ghash_remove_ex( Entry *e_prev; Entry *e = ghash_lookup_entry_prev_ex(gh, key, &e_prev, bucket_index); - BLI_assert(!valfreefp|| !(gh->flag & GHASH_FLAG_IS_GSET)); + BLI_assert(!valfreefp || !(gh->flag & GHASH_FLAG_IS_GSET)); if (e) { if (keyfreefp) keyfreefp(e->key); diff --git a/source/blender/blenlib/intern/BLI_linklist.c b/source/blender/blenlib/intern/BLI_linklist.c index 391f3ef7702..f0efe49cfdb 100644 --- a/source/blender/blenlib/intern/BLI_linklist.c +++ b/source/blender/blenlib/intern/BLI_linklist.c @@ -230,7 +230,7 @@ void *BLI_linklist_pop(struct LinkNode **listp) void *link = (*listp)->link; void *next = (*listp)->next; - MEM_freeN((*listp)); + MEM_freeN(*listp); *listp = next; return link; diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index 93977a796f5..45466226e72 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -219,7 +219,7 @@ MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack) * ``Y = 0.2126390059(R) + 0.7151686788(G) + 0.0721923154(B)`` * according to: "Derivation of Basic Television Color Equations", RP 177-1993 * - * But this is sums slightly above 1.0, the document recommends to use: + * As this sums slightly above 1.0, the document recommends to use: * ``0.2126(R) + 0.7152(G) + 0.0722(B)``, as used here. * * The high precision values are used to calculate the rounded byte weights so they add up to 255: diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 0853c93750c..fc9ea1a3acf 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -657,7 +657,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) /* hysteresis setted to 10% but not actived */ if (!DNA_struct_elem_find(fd->filesdna, "LodLevel", "int", "obhysteresis")) { - Object* ob; + Object *ob; for (ob = main->object.first; ob; ob = ob->id.next) { LodLevel *level; for (level = ob->lodlevels.first; level; level = level->next) { diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index fbf6dccdb38..01e16df9f08 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -320,7 +320,7 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, const bo if (selOnly) paste_ok = ((pchan) && (pchan->bone->flag & BONE_SELECTED)); else - paste_ok = ((pchan != NULL)); + paste_ok = (pchan != NULL); /* continue? */ if (paste_ok) { diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 4154f8e8845..2de391c5163 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1790,7 +1790,7 @@ float ED_view3d_radius_to_dist( angle = focallength_to_fov(lens, sensor_size); /* zoom influences lens, correct this by scaling the angle as a distance (by the zoom-level) */ - angle = ((atanf(tanf(angle / 2.0f) * zoom) * 2.0f)); + angle = atanf(tanf(angle / 2.0f) * zoom) * 2.0f; dist = ED_view3d_radius_to_dist_persp(angle, radius); } diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index b4ffc978d11..c6b95caa6f7 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -365,7 +365,7 @@ static unsigned char *GPU_texture_convert_pixels(int length, const float *fpixel p = pixels = MEM_callocN(sizeof(unsigned char)*len, "GPUTexturePixels"); for (a=0; a<len; a++, p++, fp++) - *p = FTOCHAR((*fp)); + *p = FTOCHAR(*fp); return pixels; } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index a49388866a6..c13d2f9b062 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2093,8 +2093,8 @@ static void rna_def_object_lodlevel(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "obhysteresis"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_range(prop, 0, 100, 10, 1); - RNA_def_property_ui_text(prop, "Hysteresis %", "Minimum distance change required to transition to the previous" - " level of detail"); + RNA_def_property_ui_text(prop, "Hysteresis %", + "Minimum distance change required to transition to the previous level of detail"); RNA_def_property_update(prop, NC_OBJECT | ND_LOD, NULL); prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 93bbb6d6491..212f7438265 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -3897,8 +3897,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "scehysteresis"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_range(prop, 0, 100, 10, 1); - RNA_def_property_ui_text(prop, "Hysteresis %", "Minimum distance change required to transition to the previous" - " level of detail"); + RNA_def_property_ui_text(prop, "Hysteresis %", + "Minimum distance change required to transition to the previous level of detail"); RNA_def_property_update(prop, NC_SCENE, NULL); } |