Cleanup: spelling in comments, use C style comments
This commit is contained in:
parent
3e1baa7d53
commit
05ab3356a7
|
@ -2245,8 +2245,8 @@ void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll)
|
|||
*/
|
||||
void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_mat[3][3])
|
||||
{
|
||||
const float SAFE_THRESHOLD = 6.1e-3f; /* theta above this value has good enough precision. */
|
||||
const float CRITICAL_THRESHOLD = 2.5e-4f; /* true singularity if xz distance is below this. */
|
||||
const float SAFE_THRESHOLD = 6.1e-3f; /* Theta above this value has good enough precision. */
|
||||
const float CRITICAL_THRESHOLD = 2.5e-4f; /* True singularity if XZ distance is below this. */
|
||||
const float THRESHOLD_SQUARED = CRITICAL_THRESHOLD * CRITICAL_THRESHOLD;
|
||||
|
||||
const float x = nor[0];
|
||||
|
|
|
@ -1039,7 +1039,7 @@ TEST_F(AssetCatalogTest, order_by_path_and_first_seen)
|
|||
const AssetCatalog first_sorted_cat(first_sorted_uuid, "simple/path/child", "");
|
||||
const AssetCatalog last_sorted_cat(last_sorted_uuid, "simple/path/child", "");
|
||||
|
||||
/* Mimick that this catalog was first-seen when loading from disk. */
|
||||
/* Mimic that this catalog was first-seen when loading from disk. */
|
||||
first_seen_cat.flags.is_first_loaded = true;
|
||||
|
||||
/* Just an assertion of the defaults; this is more to avoid confusing errors later on than an
|
||||
|
@ -1299,7 +1299,7 @@ TEST_F(AssetCatalogTest, undo_redo_one_step)
|
|||
EXPECT_TRUE(service.is_undo_possbile())
|
||||
<< "Undo should be possible after creating an undo snapshot.";
|
||||
|
||||
// Undo the creation of the catalog.
|
||||
/* Undo the creation of the catalog. */
|
||||
service.undo();
|
||||
EXPECT_FALSE(service.is_undo_possbile())
|
||||
<< "Undoing the only stored step should make it impossible to undo further.";
|
||||
|
@ -1311,7 +1311,7 @@ TEST_F(AssetCatalogTest, undo_redo_one_step)
|
|||
EXPECT_FALSE(service.get_catalog_definition_file()->contains(other_catalog_id))
|
||||
<< "The CDF should also not contain the undone catalog.";
|
||||
|
||||
// Redo the creation of the catalog.
|
||||
/* Redo the creation of the catalog. */
|
||||
service.redo();
|
||||
EXPECT_TRUE(service.is_undo_possbile())
|
||||
<< "Undoing and then redoing a step should make it possible to undo again.";
|
||||
|
|
|
@ -577,7 +577,7 @@ static float compute_collision_point_edge_tri(const float a1[3],
|
|||
return dist;
|
||||
}
|
||||
|
||||
// w3 is not perfect
|
||||
/* `w3` is not perfect. */
|
||||
static void collision_compute_barycentric(const float pv[3],
|
||||
const float p1[3],
|
||||
const float p2[3],
|
||||
|
|
|
@ -1145,12 +1145,12 @@ static void object_lib_override_apply_post(ID *id_dst, ID *id_src)
|
|||
/* Problem with point caches is that several status flags (like OUTDATED or BAKED) are read-only
|
||||
* at RNA level, and therefore not overridable per-se.
|
||||
*
|
||||
* This code is a workaround this to check all pointcaches from both source and destination
|
||||
* This code is a workaround this to check all point-caches from both source and destination
|
||||
* objects in parallel, and transfer those flags when it makes sense.
|
||||
*
|
||||
* This allows to keep baked caches across liboverrides applies.
|
||||
*
|
||||
* NOTE: This is fairly hackish and weak, but so is the pointcache system as its whole. A more
|
||||
* NOTE: This is fairly hackish and weak, but so is the point-cache system as its whole. A more
|
||||
* robust solution would be e.g. to have a specific RNA entry point to deal with such cases
|
||||
* (maybe a new flag to allow override code to set values of some read-only properties?).
|
||||
*/
|
||||
|
@ -2427,8 +2427,8 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f
|
|||
psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, flag);
|
||||
}
|
||||
|
||||
/* XXX(campbell): from reading existing code this seems correct but intended usage of
|
||||
* pointcache should /w cloth should be added in 'ParticleSystem'. */
|
||||
/* XXX(@campbellbarton): from reading existing code this seems correct but intended usage of
|
||||
* point-cache should /w cloth should be added in 'ParticleSystem'. */
|
||||
if (psysn->clmd) {
|
||||
psysn->clmd->point_cache = psysn->pointcache;
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@ TEST(BLI_uuid, generate_random)
|
|||
{
|
||||
const bUUID uuid = BLI_uuid_generate_random();
|
||||
|
||||
// The 4 MSbits represent the "version" of the UUID.
|
||||
/* The 4 MSbits represent the "version" of the UUID. */
|
||||
const uint16_t version = uuid.time_hi_and_version >> 12;
|
||||
EXPECT_EQ(version, 4);
|
||||
|
||||
// The 2 MSbits should be 0b10, indicating compliance with RFC4122.
|
||||
/* The 2 MSbits should be 0b10, indicating compliance with RFC4122. */
|
||||
const uint8_t reserved = uuid.clock_seq_hi_and_reserved >> 6;
|
||||
EXPECT_EQ(reserved, 0b10);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ TEST(BLI_uuid, generate_many_random)
|
|||
const bUUID uuid = BLI_uuid_generate_random();
|
||||
EXPECT_NE(first_uuid, uuid);
|
||||
|
||||
// Check that the non-random bits are set according to RFC4122.
|
||||
/* Check that the non-random bits are set according to RFC4122. */
|
||||
const uint16_t version = uuid.time_hi_and_version >> 12;
|
||||
EXPECT_EQ(version, 4);
|
||||
const uint8_t reserved = uuid.clock_seq_hi_and_reserved >> 6;
|
||||
|
|
|
@ -972,8 +972,8 @@ static void fullscreen_azone_init(ScrArea *area, ARegion *region)
|
|||
#define AZONEPAD_ICON (0.45f * U.widget_unit)
|
||||
static void region_azone_edge(AZone *az, ARegion *region)
|
||||
{
|
||||
/* If region is overlapped (transparent background), move AZone to content.
|
||||
* Note this is an arbitrary amount that matches nicely with numbers elswhere. */
|
||||
/* If region is overlapped (transparent background), move #AZone to content.
|
||||
* Note this is an arbitrary amount that matches nicely with numbers elsewhere. */
|
||||
int overlap_padding = (region->overlap) ? (int)(0.4f * U.widget_unit) : 0;
|
||||
|
||||
switch (az->edge) {
|
||||
|
|
|
@ -1361,7 +1361,7 @@ void VIEW3D_OT_interactive_add(struct wmOperatorType *ot)
|
|||
PropertyRNA *prop;
|
||||
|
||||
/* WORKAROUND: properties with `_funcs_runtime` should not be saved in keymaps.
|
||||
* So reasign the #PROP_IDPROPERTY flag to trick the property as not being set.
|
||||
* So reassign the #PROP_IDPROPERTY flag to trick the property as not being set.
|
||||
* (See #RNA_property_is_set). */
|
||||
PropertyFlag unsalvageable = PROP_SKIP_SAVE | PROP_HIDDEN | PROP_PTR_NO_OWNERSHIP |
|
||||
PROP_IDPROPERTY;
|
||||
|
|
Loading…
Reference in New Issue