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
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-06-20 17:46:48 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2018-06-21 15:05:58 +0300
commit73df2beda7996e7b443cba41d451daccb2e29a3e (patch)
tree7f0c7b9e0ee8f33c7dd8c9cd387d9198f4b51e67 /track_analyzing
parent222a75ff67e65a31058ba63136d4b2b3c9ce8591 (diff)
[coding] Default cache params in FileReader's constructor.
Now that we know all the places that depended on the implicit params, fall back to the simple constructor. The main problem here was that there used to be a component in generator/intermediate_data.hpp where the same field could be used both as a reader and as a writer via template metaprogramming. This effectively forced the constructors of FileReader and FileWriter to have the same parameter list. Three default parameters in FileReader's constructor that could be implicitly cast to one another only complicated the matters, so once we have removed the |withException| param an extra check was needed that all the constructors are now used as intended.
Diffstat (limited to 'track_analyzing')
-rw-r--r--track_analyzing/track_analyzer/cmd_table.cpp3
-rw-r--r--track_analyzing/track_analyzer/cmd_track.cpp3
-rw-r--r--track_analyzing/utils.cpp2
3 files changed, 3 insertions, 5 deletions
diff --git a/track_analyzing/track_analyzer/cmd_table.cpp b/track_analyzing/track_analyzer/cmd_table.cpp
index a69d4a9429..5c1f48ebc5 100644
--- a/track_analyzing/track_analyzer/cmd_table.cpp
+++ b/track_analyzing/track_analyzer/cmd_table.cpp
@@ -169,8 +169,7 @@ class MatchedTrackPointToMoveType final
{
public:
MatchedTrackPointToMoveType(string const & mwmFile)
- : m_featuresVector(FilesContainerR(make_unique<FileReader>(
- mwmFile, FileReader::kDefaultLogPageSize, FileReader::kDefaultLogPageCount)))
+ : m_featuresVector(FilesContainerR(make_unique<FileReader>(mwmFile)))
{
}
diff --git a/track_analyzing/track_analyzer/cmd_track.cpp b/track_analyzing/track_analyzer/cmd_track.cpp
index e1e5611388..0c0bc5aa25 100644
--- a/track_analyzing/track_analyzer/cmd_track.cpp
+++ b/track_analyzing/track_analyzer/cmd_track.cpp
@@ -36,8 +36,7 @@ void CmdTrack(string const & trackFile, string const & mwmName, string const & u
string const mwmFile = GetCurrentVersionMwmFile(storage, mwmName);
shared_ptr<VehicleModelInterface> vehicleModel =
CarModelFactory({}).GetVehicleModelForCountry(mwmName);
- FeaturesVectorTest featuresVector(FilesContainerR(make_unique<FileReader>(
- mwmFile, FileReader::kDefaultLogPageSize, FileReader::kDefaultLogPageCount)));
+ FeaturesVectorTest featuresVector(FilesContainerR(make_unique<FileReader>(mwmFile)));
Geometry geometry(GeometryLoader::CreateFromFile(mwmFile, vehicleModel));
uint64_t const duration =
diff --git a/track_analyzing/utils.cpp b/track_analyzing/utils.cpp
index 1ecdf43e51..1860f7064b 100644
--- a/track_analyzing/utils.cpp
+++ b/track_analyzing/utils.cpp
@@ -52,7 +52,7 @@ double CalcSpeedKMpH(double meters, uint64_t secondsElapsed)
void ReadTracks(shared_ptr<NumMwmIds> numMwmIds, string const & filename,
MwmToMatchedTracks & mwmToMatchedTracks)
{
- FileReader reader(filename, FileReader::kDefaultLogPageSize, FileReader::kDefaultLogPageCount);
+ FileReader reader(filename);
ReaderSource<FileReader> src(reader);
MwmToMatchedTracksSerializer serializer(numMwmIds);
serializer.Deserialize(mwmToMatchedTracks, src);