Skip to content

Commit

Permalink
fixing warnings #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Nov 15, 2023
1 parent 24236ed commit 1f0abda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/router/ROPerson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,16 @@ ROPerson::computeRoute(const RORouterProvider& provider,
for (const ROVehicle* const v : vehicles) {
const bool carUsed = computeIntermodal(time, provider, trip, v, resultItems, errorHandler);
double cost = 0.;
for (TripItem* const it : resultItems) {
cost += it->getCost();
for (const TripItem* const tripIt : resultItems) {
cost += tripIt->getCost();
}
if (cost < bestCost) {
bestCost = cost;
bestVeh = carUsed ? v : nullptr;
best.swap(resultItems);
}
for (TripItem* const it : resultItems) {
delete it;
for (const TripItem* const tripIt : resultItems) {
delete tripIt;
}
resultItems.clear();
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/gui/div/GUIMessageWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ GUIMessageWindow::setCursorPos(FXint pos, FXbool notify) {
const FXString candidate = text.mid(start, lineEnd(pos) - start);
FXint timePos = candidate.find(TL(" time"));
if (timePos > -1) {
timePos += std::string(TL(" time")).size() + 1;
timePos += (int)std::string(TL(" time")).size() + 1;
SUMOTime t = -1;
if (pos >= 0 && pos > start + timePos) {
t = getTimeString(candidate, timePos, 0, (int)candidate.length());
Expand Down

0 comments on commit 1f0abda

Please sign in to comment.