Review fixes

This commit is contained in:
Sergey Yershov 2015-08-11 16:30:45 +03:00 committed by Alex Zolotarev
parent fa30c35dd2
commit 4d6d9837ea
3 changed files with 4 additions and 4 deletions

View file

@ -29,8 +29,7 @@ SourceReader::SourceReader()
}
SourceReader::SourceReader(string const & filename)
: m_filename(filename)
, m_file(unique_ptr<istream, Deleter>(new ifstream(filename), Deleter()))
: m_file(unique_ptr<istream, Deleter>(new ifstream(filename), Deleter()))
{
CHECK(!m_filename.empty() , ("Filename can't be empty"));
LOG_SHORT(LINFO, ("Reading OSM data from", filename));

View file

@ -18,13 +18,12 @@ class SourceReader
}
};
string m_filename;
unique_ptr<istream, Deleter> m_file;
public:
SourceReader();
SourceReader(string const & filename);
SourceReader(istringstream & stream);
explicit SourceReader(istringstream & stream);
uint64_t Read(char * buffer, uint64_t bufferSize);
};

View file

@ -106,6 +106,8 @@ void BaseOSMParser::AddAttr(string const & key, string const & value)
bool BaseOSMParser::Push(string const & tagName)
{
ASSERT_GREATER(tagName.size(), 2, ());
// As tagKey we use first two char of tag name.
XMLElement::ETag tagKey = XMLElement::ETag(*reinterpret_cast<uint16_t const *>(tagName.data()));