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:
authorvng <viktor.govako@gmail.com>2014-08-06 18:45:25 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:24:07 +0300
commit341a8f73cb7c55b4689071350e9bc54b60403d12 (patch)
tree6b7aeadc4f0e9a560bb908ba3821b21a3c0d3d14 /coding/file_container.hpp
parent107bf6c28e648e3477e4290e342cf53ba08ee2a5 (diff)
Removed dummy assert in compare functor.
Diffstat (limited to 'coding/file_container.hpp')
-rw-r--r--coding/file_container.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/coding/file_container.hpp b/coding/file_container.hpp
index ad7f64af80..715023d0c9 100644
--- a/coding/file_container.hpp
+++ b/coding/file_container.hpp
@@ -5,6 +5,7 @@
#include "../std/vector.hpp"
#include "../std/string.hpp"
+
class FilesContainerBase
{
public:
@@ -18,6 +19,8 @@ public:
Info() {}
Info(Tag const & tag, uint64_t offset) : m_tag(tag), m_offset(offset) {}
+
+ friend string DebugPrint(Info const & info);
};
protected:
@@ -36,19 +39,12 @@ protected:
return (t1 < t2.m_tag);
}
};
+
struct LessOffset
{
bool operator() (Info const & t1, Info const & t2) const
{
- if (t1.m_offset == t2.m_offset)
- {
- // Element with nonzero size should be the last one,
- // for correct append writer mode (FilesContainerW::GetWriter).
- ASSERT ( t1.m_size == 0 || t2.m_size == 0, (t1.m_size, t2.m_size) );
- return (t1.m_size < t2.m_size);
- }
- else
- return (t1.m_offset < t2.m_offset);
+ return (t1.m_offset < t2.m_offset);
}
bool operator() (Info const & t1, uint64_t const & t2) const
{
@@ -59,6 +55,7 @@ protected:
return (t1 < t2.m_offset);
}
};
+
class EqualTag
{
Tag const & m_tag;