remove some redundant vars, assignments & checks.
This commit is contained in:
parent
3b8d4aa25f
commit
e9005b985e
@ -282,7 +282,6 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
|
||||
|
||||
// Mark all degenerate triangles
|
||||
iTotTris = iNrTrianglesIn;
|
||||
iNrTrianglesIn = 0;
|
||||
iDegenTriangles = 0;
|
||||
for(t=0; t<iTotTris; t++)
|
||||
{
|
||||
|
@ -1712,13 +1712,12 @@ static void bevel_list_flip_tangents(BevList *bl)
|
||||
/* apply user tilt */
|
||||
static void bevel_list_apply_tilt(BevList *bl)
|
||||
{
|
||||
BevPoint *bevp2, *bevp1, *bevp0;
|
||||
BevPoint *bevp2, *bevp1;
|
||||
int nr;
|
||||
float q[4];
|
||||
|
||||
bevp2= (BevPoint *)(bl+1);
|
||||
bevp1= bevp2+(bl->nr-1);
|
||||
bevp0= bevp1-1;
|
||||
|
||||
nr= bl->nr;
|
||||
while(nr--) {
|
||||
@ -1726,7 +1725,6 @@ static void bevel_list_apply_tilt(BevList *bl)
|
||||
mul_qt_qtqt(bevp1->quat, q, bevp1->quat);
|
||||
normalize_qt(bevp1->quat);
|
||||
|
||||
bevp0= bevp1;
|
||||
bevp1= bevp2;
|
||||
bevp2++;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ static void layerInterp_mdisps(void **sources, float *UNUSED(weights),
|
||||
}
|
||||
|
||||
/* Initialize the destination */
|
||||
out = disps = MEM_callocN(3*d->totdisp*sizeof(float), "iterp disps");
|
||||
disps = MEM_callocN(3*d->totdisp*sizeof(float), "iterp disps");
|
||||
|
||||
side = sqrt(d->totdisp / dst_corners);
|
||||
st = (side<<1)-1;
|
||||
|
@ -1556,10 +1556,9 @@ void graph_print_queue(DagNodeQueue *nqueue)
|
||||
void graph_print_queue_dist(DagNodeQueue *nqueue)
|
||||
{
|
||||
DagNodeQueueElem *queueElem;
|
||||
int max, count;
|
||||
int count;
|
||||
|
||||
queueElem = nqueue->first;
|
||||
max = queueElem->node->DFS_fntm;
|
||||
count = 0;
|
||||
while(queueElem) {
|
||||
fprintf(stderr,"** %25s %2.2i-%2.2i ",((ID *) queueElem->node->ob)->name,queueElem->node->DFS_dvtm,queueElem->node->DFS_fntm);
|
||||
|
@ -2204,7 +2204,6 @@ static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height,
|
||||
/* Blancmange (bmange@airdmhor.gen.nz) */
|
||||
|
||||
k = -1.0/(2.0*3.14159*blur*blur);
|
||||
fval=0;
|
||||
for (ix = 0;ix< halfWidth;ix++){
|
||||
weight = (float)exp(k*(ix*ix));
|
||||
filter[halfWidth - ix] = weight;
|
||||
|
@ -378,7 +378,6 @@ Text *add_text(const char *file, const char *relpath)
|
||||
ta->mtime= st.st_mtime;
|
||||
|
||||
ta->nlines=0;
|
||||
i=0;
|
||||
llen=0;
|
||||
for(i=0; i<len; i++) {
|
||||
if (buffer[i]=='\n') {
|
||||
|
@ -354,7 +354,7 @@ void POSELIB_OT_action_sanitise (wmOperatorType *ot)
|
||||
static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, void *UNUSED(arg))
|
||||
{
|
||||
Object *ob= get_poselib_object(C);
|
||||
bAction *act= (ob) ? ob->poselib : NULL;
|
||||
bAction *act= ob->poselib; /* never NULL */
|
||||
TimeMarker *marker;
|
||||
|
||||
/* set the operator execution context correctly */
|
||||
|
@ -1971,17 +1971,15 @@ static void ui_litem_layout_split(uiLayout *litem)
|
||||
uiLayoutItemSplt *split= (uiLayoutItemSplt*)litem;
|
||||
uiItem *item;
|
||||
float percentage;
|
||||
int itemh, x, y, w, tot=0, colw=0;
|
||||
const int tot= BLI_countlist(&litem->items);
|
||||
int itemh, x, y, w, colw=0;
|
||||
|
||||
if(tot == 0)
|
||||
return;
|
||||
|
||||
x= litem->x;
|
||||
y= litem->y;
|
||||
|
||||
for(item=litem->items.first; item; item=item->next)
|
||||
tot++;
|
||||
|
||||
if(tot == 0)
|
||||
return;
|
||||
|
||||
percentage= (split->percentage == 0.0f)? 1.0f/(float)tot: split->percentage;
|
||||
|
||||
w= (litem->w - (tot-1)*litem->space);
|
||||
|
@ -1153,6 +1153,9 @@ static void paste_mtex_copybuf(ID *id)
|
||||
case ID_PA:
|
||||
mtex= &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]);
|
||||
break;
|
||||
default:
|
||||
BLI_assert("invalid id type");
|
||||
return;
|
||||
}
|
||||
|
||||
if(mtex) {
|
||||
|
@ -5152,13 +5152,13 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
|
||||
drawcircball(GL_LINE_LOOP, vec, size*2.0, imat);
|
||||
}
|
||||
else if (pd->forcefield == PFIELD_VORTEX) {
|
||||
float ffall_val, force_val;
|
||||
float /*ffall_val,*/ force_val;
|
||||
|
||||
unit_m4(tmat);
|
||||
//if (has_ipo_code(ob->ipo, OB_PD_FFALL))
|
||||
// ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra);
|
||||
//else
|
||||
ffall_val = pd->f_power;
|
||||
// ffall_val = pd->f_power;
|
||||
|
||||
//if (has_ipo_code(ob->ipo, OB_PD_FSTR))
|
||||
// force_val = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra);
|
||||
|
@ -606,7 +606,6 @@ CineonFile*
|
||||
cineonOpenFromMem(unsigned char *mem, unsigned int size) {
|
||||
|
||||
CineonGenericHeader header;
|
||||
int i;
|
||||
|
||||
CineonFile* cineon = (CineonFile* )malloc(sizeof(CineonFile));
|
||||
if (cineon == 0) {
|
||||
@ -670,8 +669,6 @@ cineonOpenFromMem(unsigned char *mem, unsigned int size) {
|
||||
return 0;
|
||||
}
|
||||
cineon->pixelBufferUsed = 0;
|
||||
|
||||
i = cineon->imageOffset;
|
||||
|
||||
if (logimage_fseek(cineon, cineon->imageOffset, SEEK_SET) != 0) {
|
||||
if (verbose) d_printf("Couldn't seek to image data at %d\n", cineon->imageOffset);
|
||||
|
@ -518,14 +518,13 @@ static void remap_faces_23(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *
|
||||
|
||||
static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int i, int cur, int c0, int c1, int c2)
|
||||
{
|
||||
MTFace *mf, *df1, *df2, *df3;
|
||||
MTFace *mf, *df1, *df2;
|
||||
int l;
|
||||
|
||||
for(l=0; l<numlayer; l++) {
|
||||
mf = CustomData_get_layer_n(&split->faceData, CD_MTFACE, l);
|
||||
df1 = mf+cur;
|
||||
df2 = df1 + 1;
|
||||
df3 = df1 + 2;
|
||||
mf = CustomData_get_layer_n(&dm->faceData, CD_MTFACE, l);
|
||||
mf += i;
|
||||
|
||||
|
@ -279,7 +279,7 @@ int WM_init_game(bContext *C)
|
||||
|
||||
/* full screen the area */
|
||||
if(!sa->full) {
|
||||
ED_screen_full_toggle(C, wm->windows.first, sa);
|
||||
ED_screen_full_toggle(C, win, sa);
|
||||
}
|
||||
|
||||
/* Fullscreen */
|
||||
|
Loading…
Reference in New Issue
Block a user