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:
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/blenkernel/intern/subdiv_ccg.c4
-rw-r--r--source/blender/blenlib/intern/simple_expr.c56
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c4
6 files changed, 42 insertions, 28 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 629307d6cc2..bf8d259d59c 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1970,7 +1970,7 @@ static bool driver_compile_simple_expr(ChannelDriver *driver)
/* Store the result if the field is still NULL, or discard
* it if another thread got here first. */
- if (atomic_cas_ptr((void**)&driver->expr_simple, NULL, expr) != NULL) {
+ if (atomic_cas_ptr((void **)&driver->expr_simple, NULL, expr) != NULL) {
BLI_simple_expr_free(expr);
}
diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c
index 6744579d5c6..7d5c67d4393 100644
--- a/source/blender/blenkernel/intern/subdiv_ccg.c
+++ b/source/blender/blenkernel/intern/subdiv_ccg.c
@@ -158,7 +158,7 @@ static void subdiv_ccg_alloc_elements(SubdivCCG *subdiv_ccg,
subdiv_ccg->faces = MEM_calloc_arrayN(
num_faces, sizeof(SubdivCCGFace), "Subdiv CCG faces");
subdiv_ccg->grid_faces = MEM_calloc_arrayN(
- num_grids, sizeof(SubdivCCGFace*), "Subdiv CCG grid faces");
+ num_grids, sizeof(SubdivCCGFace *), "Subdiv CCG grid faces");
}
}
@@ -447,7 +447,7 @@ typedef struct RecalcInnerNormalsTLSData {
*/
static void subdiv_ccg_recalc_inner_face_normals(
RecalcInnerNormalsData *data,
- RecalcInnerNormalsTLSData *tls,
+ RecalcInnerNormalsTLSData *tls,
const int grid_index)
{
SubdivCCG *subdiv_ccg = data->subdiv_ccg;
diff --git a/source/blender/blenlib/intern/simple_expr.c b/source/blender/blenlib/intern/simple_expr.c
index 4dc4e7615cf..cfab74f9681 100644
--- a/source/blender/blenlib/intern/simple_expr.c
+++ b/source/blender/blenlib/intern/simple_expr.c
@@ -233,59 +233,73 @@ eSimpleExpr_EvalStatus BLI_simple_expr_evaluate(ParsedSimpleExpr *expr, double *
/* Simple Expression Built-In Operations ------------------- */
-static double op_negate(double arg) {
+static double op_negate(double arg)
+{
return -arg;
}
-static double op_mul(double a, double b) {
+static double op_mul(double a, double b)
+{
return a * b;
}
-static double op_div(double a, double b) {
+static double op_div(double a, double b)
+{
return a / b;
}
-static double op_add(double a, double b) {
+static double op_add(double a, double b)
+{
return a + b;
}
-static double op_sub(double a, double b) {
+static double op_sub(double a, double b)
+{
return a - b;
}
-static double op_radians(double arg) {
+static double op_radians(double arg)
+{
return arg * M_PI / 180.0;
}
-static double op_degrees(double arg) {
+static double op_degrees(double arg)
+{
return arg * 180.0 / M_PI;
}
-static double op_not(double a) {
+static double op_not(double a)
+{
return a ? 0.0 : 1.0;
}
-static double op_eq(double a, double b) {
+static double op_eq(double a, double b)
+{
return a == b ? 1.0 : 0.0;
}
-static double op_ne(double a, double b) {
+static double op_ne(double a, double b)
+{
return a != b ? 1.0 : 0.0;
}
-static double op_lt(double a, double b) {
+static double op_lt(double a, double b)
+{
return a < b ? 1.0 : 0.0;
}
-static double op_le(double a, double b) {
+static double op_le(double a, double b)
+{
return a <= b ? 1.0 : 0.0;
}
-static double op_gt(double a, double b) {
+static double op_gt(double a, double b)
+{
return a > b ? 1.0 : 0.0;
}
-static double op_ge(double a, double b) {
+static double op_ge(double a, double b)
+{
return a >= b ? 1.0 : 0.0;
}
@@ -390,7 +404,7 @@ typedef struct SimpleExprParseState {
} SimpleExprParseState;
/* Reserve space for the specified number of operations in the buffer. */
-static SimpleExprOp* parse_alloc_ops(SimpleExprParseState *state, int count)
+static SimpleExprOp *parse_alloc_ops(SimpleExprParseState *state, int count)
{
if (state->ops_count + count > state->max_ops) {
state->max_ops = power_of_2_max_i(state->ops_count + count);
@@ -403,7 +417,7 @@ static SimpleExprOp* parse_alloc_ops(SimpleExprParseState *state, int count)
}
/* Add one operation and track stack usage. */
-static SimpleExprOp* parse_add_op(SimpleExprParseState *state, eSimpleExpr_Opcode code, int stack_delta)
+static SimpleExprOp *parse_add_op(SimpleExprParseState *state, eSimpleExpr_Opcode code, int stack_delta)
{
/* track evaluation stack depth */
state->stack_ptr += stack_delta;
@@ -477,7 +491,7 @@ static bool parse_add_func(SimpleExprParseState *state, eSimpleExpr_Opcode code,
return false;
}
- parse_add_op(state, code, 1-args)->arg.ptr = funcptr;
+ parse_add_op(state, code, 1 - args)->arg.ptr = funcptr;
return true;
}
@@ -528,7 +542,7 @@ static bool parse_next_token(SimpleExprParseState *state)
/* Forbid C-style octal constants. */
if (!is_float && state->tokenbuf[0] == '0') {
- for (char *p = state->tokenbuf+1; *p; p++) {
+ for (char *p = state->tokenbuf + 1; *p; p++) {
if (*p != '0') {
return false;
}
@@ -588,7 +602,7 @@ static int parse_function_args(SimpleExprParseState *state)
int arg_count = 0;
- for(;;) {
+ for (;;) {
if (!parse_expr(state)) {
return -1;
}
@@ -668,7 +682,7 @@ static bool parse_unary(SimpleExprParseState *state)
int cnt = parse_function_args(state);
CHECK_ERROR(cnt > 0);
- parse_add_op(state, OPCODE_MIN, 1-cnt)->arg.ival = cnt;
+ parse_add_op(state, OPCODE_MIN, 1 - cnt)->arg.ival = cnt;
return true;
}
@@ -676,7 +690,7 @@ static bool parse_unary(SimpleExprParseState *state)
int cnt = parse_function_args(state);
CHECK_ERROR(cnt > 0);
- parse_add_op(state, OPCODE_MAX, 1-cnt)->arg.ival = cnt;
+ parse_add_op(state, OPCODE_MAX, 1 - cnt)->arg.ival = cnt;
return true;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 3198c856f10..b7370ad68f5 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -570,7 +570,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
/* if multiwindow and onion, set as dirty */
if ((stl->storage->is_multiwindow) &&
- (gpd->flag & (GP_DATA_SHOW_ONIONSKINS | GP_ONION_GHOST_ALWAYS)))
+ (gpd->flag & (GP_DATA_SHOW_ONIONSKINS | GP_ONION_GHOST_ALWAYS)))
{
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index b212df34954..1888d4ace83 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1513,7 +1513,7 @@ static void UV_OT_select_less(wmOperatorType *ot)
/** \name Weld Align Operator
* \{ */
-typedef enum eUVWeldAlign{
+typedef enum eUVWeldAlign {
UV_STRAIGHTEN,
UV_STRAIGHTEN_X,
UV_STRAIGHTEN_Y,
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index db893251149..7f2818a35fd 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1770,7 +1770,7 @@ static int count_active_texture_sampler(GPUShader *shader, char *source)
int samplers_id[64]; /* Remember this is per stage. */
int sampler_len = 0;
- while((code = strstr(code, "uniform "))) {
+ while ((code = strstr(code, "uniform "))) {
/* Move past "uniform". */
code += 7;
/* Skip following spaces. */
@@ -1829,7 +1829,7 @@ static bool gpu_pass_shader_validate(GPUPass *pass)
/* Validate against opengl limit. */
if ((frag_samplers_len > GPU_max_textures_frag()) ||
- (frag_samplers_len > GPU_max_textures_vert()))
+ (frag_samplers_len > GPU_max_textures_vert()))
{
return false;
}