Skip to content

Commit

Permalink
fix shadow warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
vebeckner committed Oct 25, 2017
1 parent efe9511 commit ab5810e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions Palette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ void Palette::DrawPalette(Real palMin, Real palMax, const string &numberFormat)
iphi = (palIndex[ip] + palIndex[ip + 1]) / 2;
}
iphi = totalColorSlots - 1;
for(int i(iplo); i < iphi; ++i) {
for(int ssii(iplo); ssii < iphi; ++ssii) {
XSetForeground(display, gc, makePixel(palIndex[ip]));
cy = ((totalColorSlots - 1) - i) + palOffsetY;
cy = ((totalColorSlots - 1) - ssii) + palOffsetY;
XDrawLine(display, palPixmap, gc, 0, cy, palWidth, cy);
}
}
Expand Down Expand Up @@ -299,7 +299,7 @@ void Palette::DrawPalette(Real palMin, Real palMax, const string &numberFormat)
iphi = (palIndex[ip] + palIndex[ip + 1]) / 2;
}
iphi = totalColorSlots - 1;
for(int i(iplo); i < iphi; ++i) {
for(int ssii(iplo); ssii < iphi; ++ssii) {
if(isProfPal) {
if(ip == 0) {
XSetForeground(display, gc, AVWhitePixel());
Expand All @@ -311,7 +311,7 @@ void Palette::DrawPalette(Real palMin, Real palMax, const string &numberFormat)
} else {
XSetForeground(display, gc, makePixel(palIndex[ip]));
}
cy = ((totalColorSlots - 1) - i) + palOffsetY;
cy = ((totalColorSlots - 1) - ssii) + palOffsetY;
XDrawLine(display, palPixmap, gc, 0, cy, palWidth, cy);
}
}
Expand Down
20 changes: 10 additions & 10 deletions PltApp3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@ void PltApp::DoDetach(Widget, XtPointer, XtPointer) {
XtVaSetValues(wDetachTopLevel, XmNvisual, gaPtr->PVisual(), XmNdepth, 8, NULL);
}

Widget wDetachForm, wAttach, wDLabelAxes;
Widget wDetachForm, wAttachS, wDLabelAxes;
Widget wDOrientXY, wDOrientYZ, wDOrientXZ;

wDetachForm = XtVaCreateManagedWidget("detachform",
xmFormWidgetClass, wDetachTopLevel,
NULL);

wAttach = XtVaCreateManagedWidget("Attach", xmPushButtonWidgetClass,
wDetachForm,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, Amrvis::WOFFSET,
XmNrightAttachment, XmATTACH_FORM,
XmNrightOffset, Amrvis::WOFFSET,
NULL);
AddStaticCallback(wAttach, XmNactivateCallback, &PltApp::DoAttach);
XtManageChild(wAttach);
wAttachS = XtVaCreateManagedWidget("Attach", xmPushButtonWidgetClass,
wDetachForm,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, Amrvis::WOFFSET,
XmNrightAttachment, XmATTACH_FORM,
XmNrightOffset, Amrvis::WOFFSET,
NULL);
AddStaticCallback(wAttachS, XmNactivateCallback, &PltApp::DoAttach);
XtManageChild(wAttachS);

wDOrientXY = XtVaCreateManagedWidget("XY", xmPushButtonWidgetClass,
wDetachForm,
Expand Down
18 changes: 9 additions & 9 deletions ProjectionPicture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ ProjectionPicture::~ProjectionPicture() {
// -------------------------------------------------------------------
void ProjectionPicture::ResetPalette(Palette *newpally) {
palettePtr = newpally;
int minDrawnLevel = pltAppPtr->GetPltAppState()->MinDrawnLevel();
int maxDataLevel = pltAppPtr->GetPltAppState()->MaxAllowableLevel();
subCutColor = palettePtr->makePixel(palettePtr->SafePaletteIndex(maxDataLevel + 1,
maxDataLevel));
sliceColor = palettePtr->makePixel(palettePtr->SafePaletteIndex(maxDataLevel + 2,
maxDataLevel));
for(int lev(minDrawnLevel); lev <= maxDataLevel; ++lev) {
if(lev == minDrawnLevel) {
int sMinDrawnLevel = pltAppPtr->GetPltAppState()->MinDrawnLevel();
int sMaxDataLevel = pltAppPtr->GetPltAppState()->MaxAllowableLevel();
subCutColor = palettePtr->makePixel(palettePtr->SafePaletteIndex(sMaxDataLevel + 1,
sMaxDataLevel));
sliceColor = palettePtr->makePixel(palettePtr->SafePaletteIndex(sMaxDataLevel + 2,
sMaxDataLevel));
for(int lev(sMinDrawnLevel); lev <= sMaxDataLevel; ++lev) {
if(lev == sMinDrawnLevel) {
boxColors[lev] = palettePtr->AVWhitePixel();
} else {
boxColors[lev] = palettePtr->makePixel(
palettePtr->SafePaletteIndex(lev, maxDataLevel));
palettePtr->SafePaletteIndex(lev, sMaxDataLevel));
}
}
}
Expand Down

0 comments on commit ab5810e

Please sign in to comment.