forked from organicmaps/organicmaps-tmp
Fix according to code review.
This commit is contained in:
parent
4907a1f4d8
commit
5b1e6e5d33
2 changed files with 5 additions and 8 deletions
|
@ -335,7 +335,7 @@ void BookmarkCategory::SaveToKML(ostream & s)
|
|||
<< " </Point>\n";
|
||||
|
||||
double const scale = bm->GetScale();
|
||||
if (scale != -1)
|
||||
if (scale != -1.0)
|
||||
{
|
||||
/// @todo Factor out to separate function to use for other custom params.
|
||||
s << " <ExtendedData xmlns:mwm=\"http://mapswithme.com\">\n"
|
||||
|
@ -379,10 +379,7 @@ string BookmarkCategory::GenerateUniqueFileName(const string & path, string cons
|
|||
bool BookmarkCategory::SaveToKMLFile()
|
||||
{
|
||||
if (m_file.empty())
|
||||
{
|
||||
/// @todo It's better to pass category name as file name here, isn't it?
|
||||
m_file = GenerateUniqueFileName(GetPlatform().WritableDir(), m_file);
|
||||
}
|
||||
m_file = GenerateUniqueFileName(GetPlatform().WritableDir(), m_name);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ class Bookmark
|
|||
public:
|
||||
Bookmark() {}
|
||||
Bookmark(m2::PointD const & org, string const & name, string const & type)
|
||||
: m_org(org), m_name(name), m_type(type)
|
||||
: m_org(org), m_name(name), m_type(type), m_scale(-1.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
void ClearBookmarks();
|
||||
|
||||
/// @name This function are called from Framework only.
|
||||
/// @name Theese functions are called from Framework only.
|
||||
//@{
|
||||
void AddBookmark(Bookmark const & bm, double scale);
|
||||
void ReplaceBookmark(size_t index, Bookmark const & bm, double scale);
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
void DeleteBookmark(size_t index);
|
||||
|
||||
/// @name This fuctions are public for unit tests only.
|
||||
/// @name Theese fuctions are public for unit tests only.
|
||||
/// You don't need to call them from client code.
|
||||
//@{
|
||||
void LoadFromKML(ReaderPtr<Reader> const & reader);
|
||||
|
|
Loading…
Add table
Reference in a new issue