Skip to content

Commit

Permalink
refactoring refs #12, #14698
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Apr 11, 2024
1 parent 1876fd8 commit dba8eb0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/guisim/GUIChargingStation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ GUIChargingStation::drawGL(const GUIVisualizationSettings& s) const {
glTranslated(0, 0, getType());

// set color depending if charging station is charging
if (myChargingVehicle == true) {
if (myChargingVehicle) {
GLHelper::setColor(s.colorSettings.chargingStationColorCharge);
} else {
GLHelper::setColor(s.colorSettings.chargingStationColor);
Expand Down
2 changes: 1 addition & 1 deletion src/microsim/devices/MSDevice_FCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MSDevice_FCD : public MSVehicleDevice {

/// @brief is there a filter based on shapes?
inline static bool hasShapeFilter() {
return myShapeFilterDesired == true;
return myShapeFilterDesired;
}

private:
Expand Down
4 changes: 2 additions & 2 deletions src/microsim/trigger/MSChargingStation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ MSChargingStation::addChargeValueForOutput(double WCharged, MSDevice_Battery* ba
if (battery->getChargingStartTime() > myChargeDelay) {
if (battery->getHolder().getSpeed() < battery->getStoppingThreshold()) {
status = "chargingStopped";
} else if (myChargeInTransit == true) {
} else if (myChargeInTransit) {
status = "chargingInTransit";
} else {
status = "noCharging";
}
} else {
if (myChargeInTransit == true) {
if (myChargeInTransit) {
status = "waitingChargeInTransit";
} else if (battery->getHolder().getSpeed() < battery->getStoppingThreshold()) {
status = "waitingChargeStopped";
Expand Down
2 changes: 1 addition & 1 deletion src/netbuild/NBEdgeCont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ NBEdgeCont::retrievePossiblySplit(const std::string& id, bool downstream) const
// NOTE: (TODO) for multiply split edges (e.g. 15[0][0]) one could try recursion
if ((retrieve(id + "[0]") != nullptr) && (retrieve(id + "[1]") != nullptr)) {
// Edge was split during the netbuilding process
if (downstream == true) {
if (downstream) {
return retrieve(id + "[1]");
} else {
return retrieve(id + "[0]");
Expand Down
2 changes: 1 addition & 1 deletion src/utils/vehicle/SUMOVehicleParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ SUMOVehicleParameter::Stop::write(OutputDevice& dev, const bool close, const boo
dev.writeAttr(SUMO_ATTR_COLLISION, collision);
}
// only write friendly position if is true
if (friendlyPos == true) {
if (friendlyPos) {
dev.writeAttr(SUMO_ATTR_FRIENDLY_POS, friendlyPos);
}
// only write act type if isn't empty
Expand Down

0 comments on commit dba8eb0

Please sign in to comment.