Cleanup: style

This commit is contained in:
Campbell Barton 2015-09-02 18:39:19 +10:00
parent 41b99e40c0
commit 5fe9b36aa6
Notes: blender-bot 2023-02-14 08:44:02 +01:00
Referenced by issue #45892, GPU Render Using AMD FirePro W5000 Crashes
6 changed files with 13 additions and 12 deletions

View File

@ -3667,7 +3667,7 @@ static void project_paint_prepare_all_faces(
/* backface culls individual triangles but mask normal will use polygon */
if (ps->do_backfacecull) {
if (ps->do_mask_normal) {
if (prev_poly != lt->poly) {\
if (prev_poly != lt->poly) {
int iloop;
bool culled = true;
const MPoly *poly = ps->dm_mpoly + lt->poly;

View File

@ -1507,7 +1507,7 @@ int filelist_file_findpath(struct FileList *filelist, const char *filename)
}
/* XXX TODO Cache could probably use a ghash on paths too? Not really urgent though.
* This is only used to find again renamed entry, annoying but looks hairy to get rid of it currently. */
* This is only used to find again renamed entry, annoying but looks hairy to get rid of it currently. */
for (fidx = 0; fidx < filelist->filelist.nbr_entries_filtered; fidx++) {
FileListInternEntry *entry = filelist->filelist_intern.filtered[fidx];
@ -2472,7 +2472,7 @@ static void filelist_readjob_do(
* things would crash way before we overflow that counter!
* Using an atomic operation to avoid having to lock thread...
* Note that we do not really need this here currently, since there is a single listing thread, but better
* remain consistent about threading! */
* remain consistent about threading! */
*((uint32_t *)entry->uuid) = atomic_add_uint32((uint32_t *)filelist->filelist_intern.curr_uuid, 1);
BLI_path_rel(dir, root);

View File

@ -220,8 +220,8 @@ static PyGetSetDef BPy_CurvePoint_getseters[] = {
(char *)CurvePoint_first_svertex_doc, NULL},
{(char *)"second_svertex", (getter)CurvePoint_second_svertex_get, (setter)CurvePoint_second_svertex_set,
(char *)CurvePoint_second_svertex_doc, NULL},
{(char *)"fedge", (getter)CurvePoint_fedge_get, NULL,
CurvePoint_fedge_doc, NULL},
{(char *)"fedge", (getter)CurvePoint_fedge_get, NULL,
CurvePoint_fedge_doc, NULL},
{(char *)"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, (char *)CurvePoint_t2d_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};

View File

@ -230,10 +230,12 @@ static void node_shader_exec_math(void *UNUSED(data), int UNUSED(thread), bNode
static int gpu_shader_math(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
static const char *names[] = {"math_add", "math_subtract", "math_multiply",
"math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin",
"math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max",
"math_round", "math_less_than", "math_greater_than", "math_modulo", "math_abs"};
static const char *names[] = {
"math_add", "math_subtract", "math_multiply",
"math_divide", "math_sine", "math_cosine", "math_tangent", "math_asin",
"math_acos", "math_atan", "math_pow", "math_log", "math_min", "math_max",
"math_round", "math_less_than", "math_greater_than", "math_modulo", "math_abs",
};
switch (node->custom1) {
case NODE_MATH_ADD:

View File

@ -4974,7 +4974,7 @@ static void WM_OT_previews_ensure(wmOperatorType *ot)
static EnumPropertyItem preview_id_type_items[] = {
{FILTER_ID_SCE, "SCENE", 0, "Scenes", ""},
{FILTER_ID_GR, "GROUP", 0, "Groups", ""},
{FILTER_ID_OB, "OBJECT", 0, "Objects", ""},
{FILTER_ID_OB, "OBJECT", 0, "Objects", ""},
{FILTER_ID_MA, "MATERIAL", 0, "Materials", ""},
{FILTER_ID_LA, "LAMP", 0, "Lamps", ""},
{FILTER_ID_WO, "WORLD", 0, "Worlds", ""},

View File

@ -610,8 +610,7 @@ int KX_SteeringActuator::pyattr_set_navmesh(void *self, const struct KX_PYATTRIB
if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.object = value: KX_SteeringActuator"))
return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error
if (dynamic_cast<KX_NavMeshObject *>(gameobj) == NULL)
{
if (dynamic_cast<KX_NavMeshObject *>(gameobj) == NULL) {
PyErr_Format(PyExc_TypeError, "KX_NavMeshObject is expected");
return PY_SET_ATTR_FAIL;
}