forked from organicmaps/organicmaps
Minor changes.
This commit is contained in:
parent
7ddf23c0c0
commit
c52430c4b4
3 changed files with 10 additions and 9 deletions
|
@ -86,7 +86,7 @@ public:
|
|||
explicit FilesContainerR(string const & fName,
|
||||
uint32_t logPageSize = 10,
|
||||
uint32_t logPageCount = 10);
|
||||
FilesContainerR(ReaderT const & file);
|
||||
explicit FilesContainerR(ReaderT const & file);
|
||||
|
||||
ReaderT GetReader(Tag const & tag) const;
|
||||
|
||||
|
|
|
@ -271,8 +271,10 @@ bool PreResult2::LessLinearTypesF::operator() (PreResult2 const & r1, PreResult2
|
|||
if (r1.m_str != r2.m_str)
|
||||
return (r1.m_str < r2.m_str);
|
||||
|
||||
if (r1.GetBestType() != r2.GetBestType())
|
||||
return (r1.GetBestType() < r2.GetBestType());
|
||||
uint32_t const t1 = r1.GetBestType();
|
||||
uint32_t const t2 = r2.GetBestType();
|
||||
if (t1 != t2)
|
||||
return (t1 < t2);
|
||||
|
||||
// Should stay the best feature, after unique, so add this criteria:
|
||||
|
||||
|
@ -287,8 +289,9 @@ bool PreResult2::EqualLinearTypesF::operator() (PreResult2 const & r1, PreResult
|
|||
{
|
||||
// filter equal linear features
|
||||
static IsLinearChecker checker;
|
||||
return (r1.GetBestType() == r2.GetBestType() &&
|
||||
checker.IsMy(FirstLevelIndex(r1.GetBestType())));
|
||||
|
||||
uint32_t const t1 = r1.GetBestType();
|
||||
return (t1 == r2.GetBestType() && checker.IsMy(FirstLevelIndex(t1)));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -27,12 +27,10 @@ void SearchParams::SetPosition(double lat, double lon)
|
|||
void SearchParams::SetInputLanguage(string const & language)
|
||||
{
|
||||
// @TODO take into an account zh_pinyin, ko_rm and ja_rm
|
||||
size_t delimPos = language.find("-");
|
||||
if (delimPos == string::npos)
|
||||
delimPos = language.find("_");
|
||||
size_t const delimPos = language.find_first_of("-_");
|
||||
|
||||
m_inputLanguageCode = StringUtf8Multilang::GetLangIndex(
|
||||
delimPos == string::npos ? language: language.substr(0, delimPos));
|
||||
delimPos == string::npos ? language : language.substr(0, delimPos));
|
||||
}
|
||||
|
||||
bool SearchParams::IsNearMeMode() const
|
||||
|
|
Loading…
Add table
Reference in a new issue