Review fixes.

This commit is contained in:
vng 2015-06-22 14:15:17 +03:00 committed by Alex Zolotarev
parent 41e40114b1
commit 3f37dc59dc
6 changed files with 16 additions and 17 deletions

View file

@ -50,8 +50,8 @@ HEADERS += \
first_pass_parser.hpp \
gen_mwm_info.hpp \
generate_info.hpp \
osm2type.hpp \
osm2meta.hpp \
osm2type.hpp \
osm_decl.hpp \
osm_element.hpp \
osm_id.hpp \

View file

@ -26,7 +26,7 @@ public:
if (v.empty())
return false;
using namespace feature;
using feature::Metadata;
Metadata & md = m_params.GetMetadata();
if (k == "cuisine")

View file

@ -1,14 +1,14 @@
#pragma once
#include "coding/reader.hpp"
#include "coding/multilang_utf8_string.hpp"
#include "coding/reader.hpp"
#include "std/map.hpp"
#include "std/string.hpp"
#include "std/limits.hpp"
#include "std/algorithm.hpp"
#include "std/vector.hpp"
#include "std/limits.hpp"
#include "std/map.hpp"
#include "std/static_assert.hpp"
#include "std/string.hpp"
#include "std/vector.hpp"
namespace feature

View file

@ -369,7 +369,7 @@ namespace
class BestUserMarkFinder
{
public:
BestUserMarkFinder(BookmarkManager::TouchRectHolder const & rectHolder)
BestUserMarkFinder(BookmarkManager::TTouchRectHolder const & rectHolder)
: m_rectHolder(rectHolder)
, m_d(numeric_limits<double>::max())
, m_mark(NULL) {}
@ -377,15 +377,14 @@ namespace
void operator() (UserMarkContainer const * container)
{
m2::AnyRectD const & rect = m_rectHolder(container->GetType());
UserMark const * p = container->FindMarkInRect(rect, m_d);
if (p)
if (UserMark const * p = container->FindMarkInRect(rect, m_d))
m_mark = p;
}
UserMark const * GetFindedMark() const { return m_mark; }
private:
BookmarkManager::TouchRectHolder const & m_rectHolder;
BookmarkManager::TTouchRectHolder const & m_rectHolder;
double m_d;
UserMark const * m_mark;
};
@ -396,7 +395,7 @@ UserMark const * BookmarkManager::FindNearestUserMark(m2::AnyRectD const & rect)
return FindNearestUserMark([&rect](UserMarkContainer::Type) -> m2::AnyRectD const & { return rect; });
}
UserMark const * BookmarkManager::FindNearestUserMark(TouchRectHolder const & holder) const
UserMark const * BookmarkManager::FindNearestUserMark(TTouchRectHolder const & holder) const
{
BestUserMarkFinder finder(holder);
for_each(m_categories.begin(), m_categories.end(), ref(finder));

View file

@ -1,11 +1,11 @@
#pragma once
#include "map/bookmark.hpp"
#include "map/route_track.hpp"
#include "map/user_mark_container.hpp"
#include "map/user_mark_dl_cache.hpp"
#include "map/route_track.hpp"
#include "std/unique_ptr.hpp"
#include "std/function.hpp"
#include "std/unique_ptr.hpp"
class Framework;
@ -69,10 +69,10 @@ public:
bool UserMarkHasActive() const;
bool IsUserMarkActive(UserMark const * container) const;
typedef function<m2::AnyRectD const & (UserMarkContainer::Type)> TouchRectHolder;
typedef function<m2::AnyRectD const & (UserMarkContainer::Type)> TTouchRectHolder;
UserMark const * FindNearestUserMark(m2::AnyRectD const & rect) const;
UserMark const * FindNearestUserMark(TouchRectHolder const & holder) const;
UserMark const * FindNearestUserMark(TTouchRectHolder const & holder) const;
/// Additional layer methods
void UserMarksSetVisible(UserMarkContainer::Type type, bool isVisible);

View file

@ -89,7 +89,7 @@ vector<SingleLaneInfo> GetLanesInfo(NodeID node, RoutingMapping const & routingM
Index::FeaturesLoaderGuard loader1(index, routingMapping.GetMwmId());
loader1.GetFeature(seg1.m_fid, ft1);
using namespace feature;
using feature::Metadata;
ft1.ParseMetadata();
Metadata const & md = ft1.GetMetadata();