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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-04 02:23:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-04 02:33:49 +0300
commit971ab57c7df0b0ecdc948bc47a9bc133e35fb94f (patch)
treef26af3c28dadb02019d93fc23b970164307b9361 /source/blender/blenkernel/intern/unit.c
parenta04155dd52ee26fa0567b10255d7f48849197c02 (diff)
Cleanup: style
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r--source/blender/blenkernel/intern/unit.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index c132053a82b..bca7b3dd357 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -346,7 +346,7 @@ static void unit_dual_convert(
double value, const bUnitCollection *usys,
bUnitDef const **r_unit_a, bUnitDef const **r_unit_b,
double *r_value_a, double *r_value_b,
- const bUnitDef *main_unit)
+ const bUnitDef *main_unit)
{
const bUnitDef *unit;
if (main_unit) unit = main_unit;
@@ -500,25 +500,24 @@ static const bUnitDef *get_preferred_unit_if_used(int type, PreferredUnits units
int max_offset = usys->length - 1;
- switch (type)
- {
- case B_UNIT_LENGTH:
- case B_UNIT_AREA:
- case B_UNIT_VOLUME:
- if (units.length == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.length, max_offset);
- case B_UNIT_MASS:
- if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.mass, max_offset);
- case B_UNIT_TIME:
- if (units.time == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.time, max_offset);
- case B_UNIT_ROTATION:
- if (units.rotation == 0) return usys->units + 0;
- else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
- break;
- default:
- break;
+ switch (type) {
+ case B_UNIT_LENGTH:
+ case B_UNIT_AREA:
+ case B_UNIT_VOLUME:
+ if (units.length == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.length, max_offset);
+ case B_UNIT_MASS:
+ if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.mass, max_offset);
+ case B_UNIT_TIME:
+ if (units.time == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.time, max_offset);
+ case B_UNIT_ROTATION:
+ if (units.rotation == 0) return usys->units + 0;
+ else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
+ break;
+ default:
+ break;
}
return NULL;
}
@@ -964,4 +963,4 @@ double bUnit_GetScaler(const void *usys_pt, int index)
bool bUnit_IsSuppressed(const void *usys_pt, int index)
{
return (((bUnitCollection *)usys_pt)->units[index].flag & B_UNIT_DEF_SUPPRESS) != 0;
-} \ No newline at end of file
+}