diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-03-21 12:35:00 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-03-22 15:48:06 +0300 |
commit | 431299e98329b863b2518ed863c918bc0501256d (patch) | |
tree | c36c2e412182daa911c4ed17cf81c3b8b416129d /editor | |
parent | 655b6f0a2833dc39a8c08199ecde85b5c739088b (diff) |
warnings fix
Diffstat (limited to 'editor')
-rw-r--r-- | editor/opening_hours_ui.cpp | 6 | ||||
-rw-r--r-- | editor/ui2oh.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/opening_hours_ui.cpp b/editor/opening_hours_ui.cpp index 7914d292bb..c05cc547b3 100644 --- a/editor/opening_hours_ui.cpp +++ b/editor/opening_hours_ui.cpp @@ -62,7 +62,7 @@ bool FixTimeSpans(osmoh::Timespan openingTime, osmoh::TTimespans & spans) }); osmoh::TTimespans result{spans.front()}; - for (auto i = 1, j = 0; i < spans.size(); ++i) + for (size_t i = 1, j = 0; i < spans.size(); ++i) { auto const start2 = spans[i].GetStart().GetHourMinutes().GetDuration(); auto const end1 = spans[j].GetEnd().GetHourMinutes().GetDuration(); @@ -110,7 +110,7 @@ osmoh::Timespan GetLongetsOpenSpan(osmoh::Timespan const & openingTime, return openingTime; osmoh::Timespan longestSpan{openingTime.GetStart(), excludeTime.front().GetStart()}; - for (auto i = 0; i < excludeTime.size() - 1; ++i) + for (size_t i = 0; i < excludeTime.size() - 1; ++i) { osmoh::Timespan nextOpenSpan{excludeTime[i].GetEnd(), excludeTime[i + 1].GetStart()}; longestSpan = SpanLength(longestSpan) > SpanLength(nextOpenSpan) ? longestSpan : nextOpenSpan; @@ -379,7 +379,7 @@ bool TimeTableSet::UpdateByIndex(TimeTableSet & ttSet, size_t const index) if (index >= ttSet.Size() || !updated.IsValid()) return false; - for (auto i = 0; i < ttSet.Size(); ++i) + for (size_t i = 0; i < ttSet.Size(); ++i) { if (i == index) continue; diff --git a/editor/ui2oh.cpp b/editor/ui2oh.cpp index d7f3b317f9..592a686d53 100644 --- a/editor/ui2oh.cpp +++ b/editor/ui2oh.cpp @@ -59,7 +59,7 @@ void SetUpTimeTable(osmoh::TTimespans spans, editor::ui::TimeTable & tt) // Add an end of a span of index i and start of following span // as exclude time. - for (auto i = 0; i + 1 < spans.size(); ++i) + for (size_t i = 0; i + 1 < spans.size(); ++i) tt.AddExcludeTime({spans[i].GetEnd(), spans[i + 1].GetStart()}); } @@ -156,7 +156,7 @@ osmoh::TTimespans MakeTimespans(editor::ui::TimeTable const & tt) osmoh::TTimespans spans{{tt.GetOpeningTime().GetStart(), excludeTime[0].GetStart()}}; - for (auto i = 0; i + 1 < excludeTime.size(); ++i) + for (size_t i = 0; i + 1 < excludeTime.size(); ++i) spans.emplace_back(excludeTime[i].GetEnd(), excludeTime[i + 1].GetStart()); spans.emplace_back(excludeTime.back().GetEnd(), tt.GetOpeningTime().GetEnd()); |