Skip to content

Commit

Permalink
Fixed warnings. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent cdb9b12 commit 7dc12d7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 30 deletions.
14 changes: 7 additions & 7 deletions src/netedit/elements/GNEContour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GNEContour::drawDottedContourClosed(const GUIVisualizationSettings& s, const GUI
const auto closedShape = buildDottedContourClosed(s, d, shape, scale);
gObjectsInPosition.positionWithinShape(myAC->getGUIGlObject(), myAC->getNet()->getViewNet()->getPositionInformation(), closedShape);
} else {
drawDottedContours(s, d, scale, addOffset, lineWidth);
drawDottedContours(s, d, addOffset, lineWidth);
}
}

Expand All @@ -88,7 +88,7 @@ GNEContour::drawDottedContourExtruded(const GUIVisualizationSettings& s, const G
const auto extrudedShape = buildDottedContourExtruded(s, d, shape, extrusionWidth, scale, drawFirstExtrem, drawLastExtrem, offset);
gObjectsInPosition.positionWithinShape(myAC->getGUIGlObject(), myAC->getNet()->getViewNet()->getPositionInformation(), extrudedShape);
} else {
drawDottedContours(s, d, scale, true, lineWidth);
drawDottedContours(s, d, true, lineWidth);
}
}

Expand All @@ -103,7 +103,7 @@ GNEContour::drawDottedContourRectangle(const GUIVisualizationSettings& s, const
const auto rectangleShape = buildDottedContourRectangle(s, d, pos, width, height, offsetX, offsetY, rot, scale);
gObjectsInPosition.positionWithinShape(myAC->getGUIGlObject(), myAC->getNet()->getViewNet()->getPositionInformation(), rectangleShape);
} else {
drawDottedContours(s, d, scale, true, lineWidth);
drawDottedContours(s, d, true, lineWidth);
}
}

Expand All @@ -117,7 +117,7 @@ GNEContour::drawDottedContourCircle(const GUIVisualizationSettings& s, const GUI
buildDottedContourCircle(s, d, pos, radius, scale);
gObjectsInPosition.positionWithinCircle(myAC->getGUIGlObject(), myAC->getNet()->getViewNet()->getPositionInformation(), pos, (radius * scale));
} else {
drawDottedContours(s, d, scale, true, lineWidth);
drawDottedContours(s, d, true, lineWidth);
}
}

Expand Down Expand Up @@ -186,7 +186,7 @@ GNEContour::drawDottedContourEdge(const GUIVisualizationSettings& s, const GUIVi
const auto contourShape = buildDottedContourEdge(s, d, edge, drawFirstExtrem, drawLastExtrem);
gObjectsInPosition.positionWithinShape(myAC->getGUIGlObject(), myAC->getNet()->getViewNet()->getPositionInformation(), contourShape);
} else {
drawDottedContours(s, d, 1, true, lineWidth);
drawDottedContours(s, d, true, lineWidth);
}
}

Expand All @@ -197,7 +197,7 @@ GNEContour::drawDottedContourEdges(const GUIVisualizationSettings& s, const GUIV
// first build dotted contour (only in rectangle selection mode)
buildDottedContourEdges(s, d, fromEdge, toEdge);
// draw dotted contours
drawDottedContours(s, d, 1, true, lineWidth);
drawDottedContours(s, d, true, lineWidth);
}


Expand Down Expand Up @@ -374,7 +374,7 @@ GNEContour::buildDottedContourEdges(const GUIVisualizationSettings& /*s*/, const

void
GNEContour::drawDottedContours(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
const double scale, const bool addOffset, const double lineWidth) const {
const bool addOffset, const double lineWidth) const {
// first check if draw dotted contour
if (!s.disableDottedContours && (d <= GUIVisualizationSettings::Detail::DottedContours)) {
// basic contours
Expand Down
2 changes: 1 addition & 1 deletion src/netedit/elements/GNEContour.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class GNEContour {

/// @brief draw dotted contours
void drawDottedContours(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
const double scale, const bool addOffset, const double lineWidth) const;
const bool addOffset, const double lineWidth) const;

/// @brief draw dotted contour
void drawDottedContour(const GUIVisualizationSettings& s, GUIDottedGeometry::DottedContourType type, const bool addOffset, const double lineWidth) const;
Expand Down
5 changes: 2 additions & 3 deletions src/netedit/elements/additional/GNEDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ GNEDetector::getHierarchyName() const {


void
GNEDetector::drawE1Shape(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
const double exaggeration, const double scaledWidth, const RGBColor& mainColor,
const RGBColor& secondColor) const {
GNEDetector::drawE1Shape(const GUIVisualizationSettings::Detail d, const double exaggeration,
const RGBColor& mainColor, const RGBColor& secondColor) const {
// push matrix
GLHelper::pushMatrix();
// set line width
Expand Down
5 changes: 2 additions & 3 deletions src/netedit/elements/additional/GNEDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ class GNEDetector : public GNEAdditional, public Parameterised {
bool myFriendlyPosition;

/// @brief draw E1 shape
void drawE1Shape(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
const double exaggeration, const double scaledWidth, const RGBColor& mainColor,
const RGBColor& secondColor) const;
void drawE1Shape(const GUIVisualizationSettings::Detail d, const double exaggeration,
const RGBColor& mainColor, const RGBColor& secondColor) const;

/// @brief draw E1 detector Logo
void drawE1DetectorLogo(const GUIVisualizationSettings& s, const GUIVisualizationSettings::Detail d,
Expand Down
4 changes: 1 addition & 3 deletions src/netedit/elements/additional/GNEInductionLoopDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ GNEInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const {
const auto d = s.getDetailLevel(E1Exaggeration);
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// obtain scaledSize
const double scaledWidth = s.detectorSettings.E1Width * 0.5 * s.scale;
// declare colors
RGBColor mainColor, secondColor, textColor;
// set color
Expand All @@ -186,7 +184,7 @@ GNEInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const {
// translate to front
myNet->getViewNet()->drawTranslateFrontAttributeCarrier(this, GLO_E1DETECTOR);
// draw E1 shape
drawE1Shape(s, d, E1Exaggeration, scaledWidth, mainColor, secondColor);
drawE1Shape(d, E1Exaggeration, mainColor, secondColor);
// draw E1 Logo
drawE1DetectorLogo(s, d, E1Exaggeration, "E1", textColor);
// pop layer matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ GNEInstantInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const
const auto d = s.getDetailLevel(E1InstantExaggeration);
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// obtain scaledSize
const double scaledWidth = s.detectorSettings.E1InstantWidth * 0.5 * s.scale;
// declare colors
RGBColor mainColor, secondColor, textColor;
// set color
Expand All @@ -168,7 +166,7 @@ GNEInstantInductionLoopDetector::drawGL(const GUIVisualizationSettings& s) const
// translate to front
myNet->getViewNet()->drawTranslateFrontAttributeCarrier(this, GLO_E1DETECTOR_INSTANT);
// draw E1Instant shape
drawE1Shape(s, d, E1InstantExaggeration, scaledWidth, mainColor, secondColor);
drawE1Shape(d, E1InstantExaggeration, mainColor, secondColor);
// draw E1 Logo
drawE1DetectorLogo(s, d, E1InstantExaggeration, "E1", textColor);
// pop layer matrix
Expand Down
2 changes: 0 additions & 2 deletions src/netedit/elements/additional/GNEPoly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ GNEPoly::getMoveOperation() {
// move entire shape
return new GNEMoveOperation(this, myShape);
} else {
// get geometry point radius
const auto radius = myNet->getViewNet()->getVisualisationSettings().neteditSizeSettings.polygonGeometryPointRadius;
// continue depending of tag
switch (getTagProperty().getTag()) {
case GNE_TAG_JPS_WALKABLEAREA:
Expand Down
3 changes: 0 additions & 3 deletions src/netedit/elements/demand/GNEContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,6 @@ GNEContainer::drawGL(const GUIVisualizationSettings& s) const {
const Position containerPosition = getAttributePosition(SUMO_ATTR_DEPARTPOS);
// draw geometry only if we'rent in drawForObjectUnderCursor mode
if (!s.drawForObjectUnderCursor) {
// obtain width and length
const double length = getTypeParent()->getAttributeDouble(SUMO_ATTR_LENGTH);
const double width = getTypeParent()->getAttributeDouble(SUMO_ATTR_WIDTH);
// obtain img file
const std::string file = getTypeParent()->getAttribute(SUMO_ATTR_IMGFILE);
// push draw matrix
Expand Down
5 changes: 0 additions & 5 deletions src/netedit/elements/network/GNECrossing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ GNECrossing::getNBCrossing() const {

void
GNECrossing::drawGL(const GUIVisualizationSettings& s) const {
// declare flag
bool drawExtremeSymbols = false;
// continue depending of drawCrossing flag
if (checkDrawCrossing(s)) {
// get NBCrossing
Expand Down Expand Up @@ -244,9 +242,6 @@ GNECrossing::drawGL(const GUIVisualizationSettings& s) const {
s.drawMovingGeometryPoint(crossingExaggeration, s.neteditSizeSettings.crossingGeometryPointRadius)) {
// get edit modes
const auto& editModes = myNet->getViewNet()->getEditModes();
// check if draw start und end
const bool drawExtremeSymbols = editModes.isCurrentSupermodeNetwork() &&
(editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE);
// color
const RGBColor darkerColor = crossingColor.changedBrightness(-32);
// draw geometry points
Expand Down

0 comments on commit 7dc12d7

Please sign in to comment.