style cleanup

This commit is contained in:
Campbell Barton 2012-07-29 00:20:28 +00:00
parent 7ecc0ba999
commit e32c60284a
21 changed files with 487 additions and 504 deletions

@ -1000,7 +1000,8 @@ void ntreeSetOutput(bNodeTree *ntree)
/* same type, exception for viewer */ /* same type, exception for viewer */
if (tnode->type == node->type || if (tnode->type == node->type ||
(ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && (ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) &&
ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))) { ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)))
{
if (tnode->flag & NODE_DO_OUTPUT) { if (tnode->flag & NODE_DO_OUTPUT) {
output++; output++;
if (output > 1) if (output > 1)
@ -1043,8 +1044,12 @@ static void ntreeMakeLocal_CheckLocal(void *calldata, ID *owner_id, bNodeTree *n
/* find if group is in tree */ /* find if group is in tree */
for (node = ntree->nodes.first; node; node = node->next) { for (node = ntree->nodes.first; node; node = node->next) {
if (node->id == cd->group_id) { if (node->id == cd->group_id) {
if (owner_id->lib) cd->lib= 1; if (owner_id->lib) {
else cd->local= 1; cd->lib = TRUE;
}
else {
cd->local = TRUE;
}
} }
} }
} }

@ -88,7 +88,7 @@ static unsigned int case_strhash(const void *ptr)
static unsigned int keyhash(const void *ptr) static unsigned int keyhash(const void *ptr)
{ {
const bAKey *k = ptr; const bAKey *k = ptr;
return case_strhash(k->arg); // ^ BLI_ghashutil_inthash((void*)k->pass); return case_strhash(k->arg); /* ^ BLI_ghashutil_inthash((void *)k->pass); */
} }
static int keycmp(const void *a, const void *b) static int keycmp(const void *a, const void *b)

@ -330,7 +330,7 @@ static void rotate_left(DLRBT_Tree *tree, DLRBT_Node *root)
root_slot = &root->parent->right; root_slot = &root->parent->right;
} }
else else
root_slot = ((DLRBT_Node **)&tree->root); //&((DLRBT_Node*)tree->root); root_slot = ((DLRBT_Node **)&tree->root); /* &((DLRBT_Node *)tree->root); */
/* - pivot's left child becomes root's right child /* - pivot's left child becomes root's right child
* - root now becomes pivot's left child * - root now becomes pivot's left child
@ -364,7 +364,7 @@ static void rotate_right(DLRBT_Tree *tree, DLRBT_Node *root)
root_slot = &root->parent->right; root_slot = &root->parent->right;
} }
else else
root_slot = ((DLRBT_Node **)&tree->root); //&((DLRBT_Node*)tree->root); root_slot = ((DLRBT_Node **)&tree->root); /* &((DLRBT_Node*)tree->root); */
/* - pivot's right child becomes root's left child /* - pivot's right child becomes root's left child
* - root now becomes pivot's right child * - root now becomes pivot's right child

@ -2674,10 +2674,11 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
* of our UI functions take prop rather then propname. * of our UI functions take prop rather then propname.
*/ */
#define UI_DEF_BUT_RNA_DISABLE(but) \ #define UI_DEF_BUT_RNA_DISABLE(but) { \
but->flag |= UI_BUT_DISABLED; \ but->flag |= UI_BUT_DISABLED; \
but->lock = 1; \ but->lock = TRUE; \
but->lockstr = "" but->lockstr = ""; \
} (void)0
static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str,

@ -454,7 +454,8 @@ static KnifeVert *knife_split_edge(KnifeTool_OpData *kcd, KnifeEdge *kfe, float
newkfe->v2->draw = 1; newkfe->v2->draw = 1;
if (kfe->e) { if (kfe->e) {
knife_add_edge_faces_to_vert(kcd, newkfe->v2, kfe->e); knife_add_edge_faces_to_vert(kcd, newkfe->v2, kfe->e);
} else { }
else {
/* kfe cuts across an existing face. /* kfe cuts across an existing face.
If v1 and v2 are in multiple faces together (e.g., if they If v1 and v2 are in multiple faces together (e.g., if they
are in doubled polys) then this arbitrarily chooses one of them */ are in doubled polys) then this arbitrarily chooses one of them */
@ -2944,7 +2945,8 @@ wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
{KNF_MODAL_CUT_THROUGH_TOGGLE, "CUT_THROUGH_TOGGLE", 0, "Toggle Cut Through", ""}, {KNF_MODAL_CUT_THROUGH_TOGGLE, "CUT_THROUGH_TOGGLE", 0, "Toggle Cut Through", ""},
{KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""}, {KNF_MODAL_NEW_CUT, "NEW_CUT", 0, "End Current Cut", ""},
{KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""}, {KNF_MODAL_ADD_CUT, "ADD_CUT", 0, "Add Cut", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}
};
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Knife Tool Modal Map"); wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Knife Tool Modal Map");

@ -130,7 +130,6 @@ static SpaceLink *action_new(const bContext *C)
static void action_free(SpaceLink *UNUSED(sl)) static void action_free(SpaceLink *UNUSED(sl))
{ {
// SpaceAction *saction= (SpaceAction *) sl; // SpaceAction *saction= (SpaceAction *) sl;
} }

@ -553,7 +553,8 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
static EnumPropertyItem logicbricks_move_direction[] = { static EnumPropertyItem logicbricks_move_direction[] = {
{1, "UP", 0, "Move Up", ""}, {1, "UP", 0, "Move Up", ""},
{2, "DOWN", 0, "Move Down", ""}, {2, "DOWN", 0, "Move Down", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}
};
static int sensor_move_exec(bContext *C, wmOperator *op) static int sensor_move_exec(bContext *C, wmOperator *op)

@ -24,7 +24,6 @@
* \ingroup RNA * \ingroup RNA
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -206,30 +205,6 @@ EnumPropertyItem prop_wave_items[] = {
#include "DNA_scene_types.h" #include "DNA_scene_types.h"
#include "WM_api.h" #include "WM_api.h"
static void rna_Node_custom3_set_as_int(PointerRNA *ptr, int value)
{
bNode *node = (bNode *)ptr->data;
node->custom3 = value;
}
static int rna_Node_custom3_get_as_int(PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
return (int)node->custom3;
}
static void rna_Node_custom4_set_as_int(PointerRNA *ptr, int value)
{
bNode *node = (bNode *)ptr->data;
node->custom4 = value;
}
static int rna_Node_custom4_get_as_int(PointerRNA *ptr)
{
bNode *node = (bNode *)ptr->data;
return (int)node->custom4;
}
static StructRNA *rna_Node_refine(struct PointerRNA *ptr) static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
{ {
bNode *node = (bNode *)ptr->data; bNode *node = (bNode *)ptr->data;