Cleanup: comments, style
This commit is contained in:
parent
c48ebb44ae
commit
b8a6cd0140
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user