Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2021-02-26 14:26:41 +0300
committermpimenov <mpimenov@users.noreply.github.com>2021-03-01 11:01:13 +0300
commita05dec2cf91f7a0739a75b92013dbc9a2a2d39e5 (patch)
tree95279c563f932ff978edc57cb8e6a6ef3e0c7333
parent437f4c75d413049165a6e627f2a0cefb85ec0afb (diff)
Review fixes
-rw-r--r--coding/mmap_reader.cpp14
-rw-r--r--coding/mmap_reader.hpp4
-rw-r--r--generator/intermediate_data.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/coding/mmap_reader.cpp b/coding/mmap_reader.cpp
index 84c86aaf42..adfca8d31c 100644
--- a/coding/mmap_reader.cpp
+++ b/coding/mmap_reader.cpp
@@ -21,7 +21,7 @@ using namespace std;
class MmapReader::MmapData
{
public:
- explicit MmapData(string const & fileName, Advise advise)
+ explicit MmapData(string const & fileName, Advice advice)
{
// @TODO add windows support
#ifndef OMIM_OS_WINDOWS
@@ -43,11 +43,11 @@ public:
}
int adv = MADV_NORMAL;
- switch (advise)
+ switch (advice)
{
- case Advise::Random: adv = MADV_RANDOM; break;
- case Advise::Sequential: adv = MADV_SEQUENTIAL; break;
- case Advise::Normal: adv = MADV_NORMAL; break;
+ case Advice::Random: adv = MADV_RANDOM; break;
+ case Advice::Sequential: adv = MADV_SEQUENTIAL; break;
+ case Advice::Normal: adv = MADV_NORMAL; break;
}
if (madvise(m_memory, s.st_size, adv) != 0)
@@ -71,9 +71,9 @@ private:
int m_fd = 0;
};
-MmapReader::MmapReader(string const & fileName, Advise advise)
+MmapReader::MmapReader(string const & fileName, Advice advice)
: base_type(fileName)
- , m_data(std::make_shared<MmapData>(fileName, advise))
+ , m_data(std::make_shared<MmapData>(fileName, advice))
, m_offset(0)
, m_size(m_data->m_size)
{
diff --git a/coding/mmap_reader.hpp b/coding/mmap_reader.hpp
index 5d0d31a65f..b17eb7767a 100644
--- a/coding/mmap_reader.hpp
+++ b/coding/mmap_reader.hpp
@@ -11,14 +11,14 @@
class MmapReader : public ModelReader
{
public:
- enum class Advise
+ enum class Advice
{
Normal,
Random,
Sequential
};
- explicit MmapReader(std::string const & fileName, Advise advise = Advise::Normal);
+ explicit MmapReader(std::string const & fileName, Advice advice = Advice::Normal);
uint64_t Size() const override;
void Read(uint64_t pos, void * p, size_t size) const override;
diff --git a/generator/intermediate_data.cpp b/generator/intermediate_data.cpp
index 61252d7ae4..19db5f1977 100644
--- a/generator/intermediate_data.cpp
+++ b/generator/intermediate_data.cpp
@@ -76,7 +76,7 @@ class RawFilePointStorageMmapReader : public PointStorageReaderInterface
{
public:
explicit RawFilePointStorageMmapReader(string const & name)
- : m_mmapReader(name, MmapReader::Advise::Random)
+ : m_mmapReader(name, MmapReader::Advice::Random)
{}
// PointStorageReaderInterface overrides: