forked from organicmaps/organicmaps
Review fixes.
This commit is contained in:
parent
7de8ecf5fb
commit
2b6ad99e2b
2 changed files with 8 additions and 10 deletions
|
@ -23,9 +23,7 @@
|
|||
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <sys/resource.h>
|
||||
|
||||
|
@ -39,9 +37,9 @@ namespace
|
|||
{
|
||||
uint64_t ReadVersionFromHeader(platform::LocalCountryFile const & mwm)
|
||||
{
|
||||
vector<string> specialFiles = {WORLD_FILE_NAME, WORLD_COASTS_FILE_NAME,
|
||||
WORLD_COASTS_OBSOLETE_FILE_NAME};
|
||||
for (auto const & name : specialFiles)
|
||||
vector<string> const kSpecialFiles = {WORLD_FILE_NAME, WORLD_COASTS_FILE_NAME,
|
||||
WORLD_COASTS_OBSOLETE_FILE_NAME};
|
||||
for (auto const & name : kSpecialFiles)
|
||||
{
|
||||
if (mwm.GetCountryName() == name)
|
||||
return mwm.GetVersion();
|
||||
|
|
|
@ -85,7 +85,7 @@ struct CompletenessQuery
|
|||
{
|
||||
DECLARE_EXCEPTION(MalformedQueryException, RootException);
|
||||
|
||||
explicit CompletenessQuery(string s)
|
||||
explicit CompletenessQuery(string && s)
|
||||
{
|
||||
s.append(" ");
|
||||
|
||||
|
@ -97,7 +97,7 @@ struct CompletenessQuery
|
|||
("Can't split", s, ", found", parts.size(), "part(s):", parts));
|
||||
}
|
||||
|
||||
auto idx = parts[0].find(':');
|
||||
auto const idx = parts[0].find(':');
|
||||
if (idx == string::npos)
|
||||
MYTHROW(MalformedQueryException, ("Could not find \':\':", s));
|
||||
|
||||
|
@ -249,13 +249,13 @@ void CheckCompleteness(string const & path, DataSource & dataSource, TestSearchE
|
|||
// todo(@m) Process the queries on the fly and do not keep them.
|
||||
vector<CompletenessQuery> queries;
|
||||
|
||||
string s;
|
||||
while (getline(stream, s))
|
||||
string line;
|
||||
while (getline(stream, line))
|
||||
{
|
||||
++totalQueries;
|
||||
try
|
||||
{
|
||||
CompletenessQuery q(s);
|
||||
CompletenessQuery q(move(line));
|
||||
q.m_request =
|
||||
make_unique<TestSearchRequest>(engine, q.m_query, locale, Mode::Everywhere, viewport);
|
||||
queries.push_back(move(q));
|
||||
|
|
Loading…
Add table
Reference in a new issue