| 191 | } |
| 192 | |
| 193 | bool TimeTable::ReplaceExcludeTime(osmoh::Timespan const & span, size_t const index) |
| 194 | { |
| 195 | if (IsTwentyFourHours() || index > m_excludeTime.size()) |
| 196 | return false; |
| 197 | |
| 198 | auto copy = m_excludeTime; |
| 199 | if (index == m_excludeTime.size()) |
| 200 | copy.push_back(span); |
| 201 | else |
| 202 | copy[index] = span; |
| 203 | |
| 204 | if (!FixTimeSpans(m_openingTime, copy)) |
| 205 | return false; |
| 206 | |
| 207 | m_excludeTime.swap(copy); |
| 208 | return true; |
| 209 | } |
| 210 | |
| 211 | bool TimeTable::RemoveExcludeTime(size_t const index) |
| 212 | { |