| 51 | using CameraMapItem = std::pair<SegmentCoord, RouteSegment::SpeedCamera>; |
| 52 | |
| 53 | CameraMap LoadSpeedCameraFromMwm(string const & mwmFullPath) |
| 54 | { |
| 55 | FilesContainerR const cont(mwmFullPath); |
| 56 | CHECK(cont.IsExist(CAMERAS_INFO_FILE_TAG), ("Cannot find", CAMERAS_INFO_FILE_TAG, "section")); |
| 57 | |
| 58 | try |
| 59 | { |
| 60 | FilesContainerR::TReader const reader = cont.GetReader(CAMERAS_INFO_FILE_TAG); |
| 61 | ReaderSource<FilesContainerR::TReader> src(reader); |
| 62 | |
| 63 | CameraMap result; |
| 64 | DeserializeSpeedCamsFromMwm(src, result); |
| 65 | return result; |
| 66 | } |
| 67 | catch (Reader::OpenException const & e) |
| 68 | { |
| 69 | TEST(false, ("Error while reading", CAMERAS_INFO_FILE_TAG, "section.", e.Msg())); |
| 70 | return {}; |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | std::vector<CameraMapItem> UnpackMapToVector(CameraMap const & cameraMap) |
| 75 | { |
no test coverage detected