Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/3party
diff options
context:
space:
mode:
authorSergey Magidovich <mgsergio@mapswithme.com>2015-12-11 14:54:27 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:03:52 +0300
commit3e9ced74c4e5d20a1286d7400c3910fdaa2d2229 (patch)
tree8dc7e1eb7d620dce2616306d5edc90296e2b30cb /3party
parent9dfa0e5e286c789d5c19316ae26ee76d15d2efb1 (diff)
Fix extended hours detection.
Diffstat (limited to '3party')
-rw-r--r--3party/opening_hours/opening_hours.cpp2
-rw-r--r--3party/opening_hours/opening_hours_tests/opening_hours_tests.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/3party/opening_hours/opening_hours.cpp b/3party/opening_hours/opening_hours.cpp
index 49df936255..342a339153 100644
--- a/3party/opening_hours/opening_hours.cpp
+++ b/3party/opening_hours/opening_hours.cpp
@@ -299,7 +299,7 @@ bool Timespan::HasExtendedHours() const
if (endHM.IsExtended())
return true;
- return endHM.GetDurationCount() != 0 && (endHM.GetDuration() < startHM.GetDuration());
+ return endHM.GetDuration() <= startHM.GetDuration();
}
std::ostream & operator<<(std::ostream & ost, Timespan const & span)
diff --git a/3party/opening_hours/opening_hours_tests/opening_hours_tests.cpp b/3party/opening_hours/opening_hours_tests/opening_hours_tests.cpp
index e77f944131..d86ff88e91 100644
--- a/3party/opening_hours/opening_hours_tests/opening_hours_tests.cpp
+++ b/3party/opening_hours/opening_hours_tests/opening_hours_tests.cpp
@@ -312,7 +312,7 @@ BOOST_AUTO_TEST_CASE(OpeningHours_TestTimespan)
span.SetStart(HourMinutes(10_h));
span.SetEnd(HourMinutes(00_h));
- BOOST_CHECK(!span.HasExtendedHours());
+ BOOST_CHECK(span.HasExtendedHours());
BOOST_CHECK_EQUAL(ToString(span), "10:00-00:00");
}