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:
Diffstat (limited to 'coding/dd_vector.hpp')
-rw-r--r--coding/dd_vector.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/coding/dd_vector.hpp b/coding/dd_vector.hpp
index f31452d6d9..255822a984 100644
--- a/coding/dd_vector.hpp
+++ b/coding/dd_vector.hpp
@@ -166,10 +166,11 @@ public:
private:
void InitSize()
{
- if ((m_reader.Size() % sizeof(T)) != 0)
- MYTHROW(OpenException, (m_reader.Size(), sizeof(T)));
- // TODO: Check that reader.Size() % sizeof(T) == 0
- m_Size = m_reader.Size() / sizeof(T);
+ uint64_t const sz = m_reader.Size();
+ if ((sz % sizeof(T)) != 0)
+ MYTHROW(OpenException, (sz, sizeof(T)));
+
+ m_Size = sz / sizeof(T);
}
// TODO: Refactor me to use Reader by pointer.