fix own mistake [#27451] Flip to Top / Flip to Bottom menuitems on right click on header not working
also get rig of more shadowed vars (-Wshadow).
This commit is contained in:
parent
af49b5f6c9
commit
f5ec4cf4e9
@ -91,12 +91,12 @@ void txt_backspace_word (struct Text *text);
|
||||
int txt_add_char (struct Text *text, char add);
|
||||
int txt_add_raw_char (struct Text *text, char add);
|
||||
int txt_replace_char (struct Text *text, char add);
|
||||
void txt_export_to_object (struct Text *text);
|
||||
void txt_export_to_object(struct Text *text);
|
||||
void txt_export_to_objects(struct Text *text);
|
||||
void unindent (struct Text *text);
|
||||
void comment (struct Text *text);
|
||||
void indent (struct Text *text);
|
||||
void uncomment (struct Text *text);
|
||||
void txt_unindent (struct Text *text);
|
||||
void txt_comment (struct Text *text);
|
||||
void txt_indent (struct Text *text);
|
||||
void txt_uncomment (struct Text *text);
|
||||
int setcurr_tab_spaces (struct Text *text, int space);
|
||||
|
||||
void txt_add_marker (struct Text *text, struct TextLine *line, int start, int end, const unsigned char color[4], int group, int flags);
|
||||
|
@ -1894,13 +1894,13 @@ void txt_do_undo(Text *text)
|
||||
|
||||
|
||||
if (op==UNDO_INDENT) {
|
||||
unindent(text);
|
||||
txt_unindent(text);
|
||||
} else if (op== UNDO_UNINDENT) {
|
||||
indent(text);
|
||||
txt_indent(text);
|
||||
} else if (op == UNDO_COMMENT) {
|
||||
uncomment(text);
|
||||
txt_uncomment(text);
|
||||
} else if (op == UNDO_UNCOMMENT) {
|
||||
comment(text);
|
||||
txt_comment(text);
|
||||
}
|
||||
|
||||
text->undo_pos--;
|
||||
@ -2110,13 +2110,13 @@ void txt_do_redo(Text *text)
|
||||
}
|
||||
|
||||
if (op==UNDO_INDENT) {
|
||||
indent(text);
|
||||
txt_indent(text);
|
||||
} else if (op== UNDO_UNINDENT) {
|
||||
unindent(text);
|
||||
txt_unindent(text);
|
||||
} else if (op == UNDO_COMMENT) {
|
||||
comment(text);
|
||||
txt_comment(text);
|
||||
} else if (op == UNDO_UNCOMMENT) {
|
||||
uncomment(text);
|
||||
txt_uncomment(text);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -2501,7 +2501,7 @@ int txt_replace_char (Text *text, char add)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void indent(Text *text)
|
||||
void txt_indent(Text *text)
|
||||
{
|
||||
int len, num;
|
||||
char *tmp;
|
||||
@ -2564,7 +2564,7 @@ void indent(Text *text)
|
||||
}
|
||||
}
|
||||
|
||||
void unindent(Text *text)
|
||||
void txt_unindent(Text *text)
|
||||
{
|
||||
int num = 0;
|
||||
const char *remove = "\t";
|
||||
@ -2622,7 +2622,7 @@ void unindent(Text *text)
|
||||
}
|
||||
}
|
||||
|
||||
void comment(Text *text)
|
||||
void txt_comment(Text *text)
|
||||
{
|
||||
int len, num;
|
||||
char *tmp;
|
||||
@ -2674,7 +2674,7 @@ void comment(Text *text)
|
||||
}
|
||||
}
|
||||
|
||||
void uncomment(Text *text)
|
||||
void txt_uncomment(Text *text)
|
||||
{
|
||||
int num = 0;
|
||||
char remove = '#';
|
||||
@ -2751,19 +2751,19 @@ int setcurr_tab_spaces (Text *text, int space)
|
||||
* 2) within an identifier
|
||||
* 3) after the cursor (text->curc), i.e. when creating space before a function def [#25414]
|
||||
*/
|
||||
int a, indent = 0;
|
||||
int a, is_indent = 0;
|
||||
for(a=0; (a < text->curc) && (text->curl->line[a] != '\0'); a++)
|
||||
{
|
||||
char ch= text->curl->line[a];
|
||||
if (ch=='#') {
|
||||
break;
|
||||
} else if (ch==':') {
|
||||
indent = 1;
|
||||
is_indent = 1;
|
||||
} else if (ch==']' || ch=='}' || ch=='"' || ch=='\'') {
|
||||
indent = 0;
|
||||
is_indent = 0;
|
||||
}
|
||||
}
|
||||
if (indent) {
|
||||
if (is_indent) {
|
||||
i += space;
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) {
|
||||
eh->buckets[hash]= e;
|
||||
|
||||
if (++eh->nentries>eh->nbuckets*3) {
|
||||
Entry *e, **old= eh->buckets;
|
||||
Entry **old= eh->buckets;
|
||||
int i, nold= eh->nbuckets;
|
||||
|
||||
eh->nbuckets= hashsizes[++eh->cursize];
|
||||
|
@ -4138,7 +4138,6 @@ static void direct_link_object(FileData *fd, Object *ob)
|
||||
bSensor *sens;
|
||||
bController *cont;
|
||||
bActuator *act;
|
||||
int a;
|
||||
|
||||
/* weak weak... this was only meant as draw flag, now is used in give_base_to_objects too */
|
||||
ob->flag &= ~OB_FROMGROUP;
|
||||
@ -4238,6 +4237,7 @@ static void direct_link_object(FileData *fd, Object *ob)
|
||||
sb->keys= newdataadr(fd, sb->keys);
|
||||
test_pointer_array(fd, (void **)&sb->keys);
|
||||
if(sb->keys) {
|
||||
int a;
|
||||
for(a=0; a<sb->totkey; a++) {
|
||||
sb->keys[a]= newdataadr(fd, sb->keys[a]);
|
||||
}
|
||||
@ -8378,7 +8378,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
ArmatureModifierData *amd = (ArmatureModifierData*) md;
|
||||
if(amd->object && amd->deformflag==0) {
|
||||
Object *oba= newlibadr(fd, lib, amd->object);
|
||||
bArmature *arm= newlibadr(fd, lib, oba->data);
|
||||
arm= newlibadr(fd, lib, oba->data);
|
||||
amd->deformflag= arm->deformflag;
|
||||
}
|
||||
}
|
||||
@ -8525,7 +8525,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
int a;
|
||||
for(a=0; a<MAX_MTEX; a++) {
|
||||
if(ma->mtex[a] && ma->mtex[a]->tex) {
|
||||
Tex *tex= newlibadr(fd, lib, ma->mtex[a]->tex);
|
||||
tex= newlibadr(fd, lib, ma->mtex[a]->tex);
|
||||
if(tex && tex->type==TEX_STUCCI)
|
||||
ma->mtex[a]->mapto &= ~(MAP_COL|MAP_SPEC|MAP_REF);
|
||||
}
|
||||
@ -8717,7 +8717,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
/* now, subversion control! */
|
||||
if(main->subversionfile < 3) {
|
||||
bScreen *sc;
|
||||
Image *ima;
|
||||
Tex *tex;
|
||||
|
||||
@ -10133,7 +10132,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
ToolSettings *ts;
|
||||
//PTCacheID *pid;
|
||||
//ListBase pidlist;
|
||||
int a;
|
||||
|
||||
for(ob = main->object.first; ob; ob = ob->id.next) {
|
||||
//BKE_ptcache_ids_from_object(&pidlist, ob);
|
||||
@ -10172,6 +10170,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
for(ma = main->mat.first; ma; ma = ma->id.next) {
|
||||
int a;
|
||||
if(ma->mode & MA_WIRE) {
|
||||
ma->material_type= MA_TYPE_WIRE;
|
||||
ma->mode &= ~MA_WIRE;
|
||||
|
@ -2130,8 +2130,8 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
|
||||
writestruct(wd, DATA, "SpaceText", 1, sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_SCRIPT) {
|
||||
SpaceScript *sc = (SpaceScript*)sl;
|
||||
sc->but_refs = NULL;
|
||||
SpaceScript *scr = (SpaceScript*)sl;
|
||||
scr->but_refs = NULL;
|
||||
writestruct(wd, DATA, "SpaceScript", 1, sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_ACTION) {
|
||||
|
@ -780,7 +780,7 @@ static void calc_shapeKeys(Object *obedit)
|
||||
|
||||
/* are there keys? */
|
||||
if(cu->key) {
|
||||
int a, i, j;
|
||||
int a, i;
|
||||
EditNurb *editnurb= cu->editnurb;
|
||||
KeyBlock *currkey;
|
||||
KeyBlock *actkey= BLI_findlink(&cu->key->block, editnurb->shapenr-1);
|
||||
@ -804,7 +804,6 @@ static void calc_shapeKeys(Object *obedit)
|
||||
}
|
||||
|
||||
if(act_is_basis) { /* active key is a base */
|
||||
int j;
|
||||
int totvec= 0;
|
||||
|
||||
/* Calculate needed memory to store offset */
|
||||
@ -831,6 +830,7 @@ static void calc_shapeKeys(Object *obedit)
|
||||
oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
|
||||
|
||||
if (oldbezt) {
|
||||
int j;
|
||||
for (j= 0; j < 3; ++j) {
|
||||
VECSUB(ofs[i], bezt->vec[j], oldbezt->vec[j]);
|
||||
i++;
|
||||
@ -878,6 +878,7 @@ static void calc_shapeKeys(Object *obedit)
|
||||
bezt= nu->bezt;
|
||||
a= nu->pntsu;
|
||||
while(a--) {
|
||||
int j;
|
||||
oldbezt= getKeyIndexOrig_bezt(editnurb, bezt);
|
||||
|
||||
for (j= 0; j < 3; ++j, ++i) {
|
||||
@ -932,6 +933,7 @@ static void calc_shapeKeys(Object *obedit)
|
||||
while(a--) {
|
||||
index= getKeyIndexOrig_keyIndex(editnurb, bezt);
|
||||
if (index >= 0) {
|
||||
int j;
|
||||
curofp= ofp + index;
|
||||
|
||||
for (j= 0; j < 3; ++j, ++i) {
|
||||
@ -953,6 +955,7 @@ static void calc_shapeKeys(Object *obedit)
|
||||
|
||||
fp+= 3; /* alphas */
|
||||
} else {
|
||||
int j;
|
||||
for (j= 0; j < 3; ++j, ++i) {
|
||||
VECCOPY(fp, bezt->vec[j]);
|
||||
fp+= 3;
|
||||
|
@ -2616,7 +2616,7 @@ static int header_flip_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
*/
|
||||
if((ar == NULL) || (ar->regiontype != RGN_TYPE_HEADER)) {
|
||||
ScrArea *sa= CTX_wm_area(C);
|
||||
ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
|
||||
ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
|
||||
|
||||
/* don't do anything if no region */
|
||||
if(ar == NULL)
|
||||
|
@ -894,7 +894,7 @@ static int indent_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
if(txt_has_sel(text)) {
|
||||
txt_order_cursors(text);
|
||||
indent(text);
|
||||
txt_indent(text);
|
||||
}
|
||||
else
|
||||
txt_add_char(text, '\t');
|
||||
@ -929,7 +929,7 @@ static int unindent_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
|
||||
|
||||
txt_order_cursors(text);
|
||||
unindent(text);
|
||||
txt_unindent(text);
|
||||
|
||||
text_update_edited(text);
|
||||
|
||||
@ -1011,7 +1011,7 @@ static int comment_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
|
||||
|
||||
txt_order_cursors(text);
|
||||
comment(text);
|
||||
txt_comment(text);
|
||||
text_update_edited(text);
|
||||
|
||||
text_update_cursor_moved(C);
|
||||
@ -1044,7 +1044,7 @@ static int uncomment_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
text_drawcache_tag_update(CTX_wm_space_text(C), 0);
|
||||
|
||||
txt_order_cursors(text);
|
||||
uncomment(text);
|
||||
txt_uncomment(text);
|
||||
text_update_edited(text);
|
||||
|
||||
text_update_cursor_moved(C);
|
||||
|
@ -4937,8 +4937,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
|
||||
/* when running transform non-interactively (operator exec),
|
||||
* we need to update the pose otherwise no updates get called during
|
||||
* transform and the auto-ik is not applied. see [#26164] */
|
||||
struct Object *ob=t->poseobj;
|
||||
where_is_pose(t->scene, ob);
|
||||
struct Object *pose_ob=t->poseobj;
|
||||
where_is_pose(t->scene, pose_ob);
|
||||
}
|
||||
|
||||
/* if target-less IK grabbing, we calculate the pchan transforms and clear flag */
|
||||
|
@ -1613,9 +1613,9 @@ static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, f
|
||||
|
||||
for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
|
||||
{
|
||||
Object *ob = dupli_ob->ob;
|
||||
Object *dob = dupli_ob->ob;
|
||||
|
||||
retval |= snapObject(scene, ar, ob, 0, dupli_ob->mat, ray_start, ray_normal, mval, loc, no, dist, &depth);
|
||||
retval |= snapObject(scene, ar, dob, 0, dupli_ob->mat, ray_start, ray_normal, mval, loc, no, dist, &depth);
|
||||
}
|
||||
|
||||
free_object_duplilist(lb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user