Petr Onderka has uploaded a new change for review.
https://gerrit.wikimedia.org/r/84118
Change subject: Don't use the override keyword for GCC 4.6
......................................................................
Don't use the override keyword for GCC 4.6
Change-Id: I32293346ba31fa90694f23a37500428658f52d31
---
M CMakeLists.txt
M Diff/Changes/DeleteRevisionChange.h
M Diff/Changes/DiffTextGroup.h
M Diff/Changes/FullDeletePageChange.h
M Diff/Changes/NewModelFormatChange.h
M Diff/Changes/NewPageChange.h
M Diff/Changes/NewRevisionChange.h
M Diff/Changes/PageChange.h
M Diff/Changes/PartialDeletePageChange.h
M Diff/Changes/RevisionChange.h
M Diff/Changes/SiteInfoChange.h
M DumpException.h
M DumpObjects/DumpIpV4User.h
M DumpObjects/DumpIpV6User.h
M DumpObjects/DumpNamedUser.h
M DumpObjects/DumpObject.h
M DumpObjects/DumpPage.h
M DumpObjects/DumpRevision.h
M DumpObjects/DumpSiteInfo.h
M DumpObjects/DumpUser.h
M DumpObjects/FileHeader.h
M DumpObjects/TextGroup.h
M DumpWriters/ArticlesWriterWrapper.h
M DumpWriters/CompositeWriter.h
M DumpWriters/CurrentWriterWrapper.h
M DumpWriters/DumpWriter.h
M DumpWriters/WriterWrapper.h
M Incremental dumps.vcxproj
M Indexes/IndexInnerNode.h
M Indexes/IndexLeafNode.h
M Indexes/IndexNode.h
M Indexes/Iterators/IndexInnerIterator.h
M Indexes/Iterators/IndexLeafIterator.h
M Objects/IpV4User.h
M Objects/IpV6User.h
M Objects/NamedUser.h
M XmlInput/WrapperInputStream.h
A common.h
M libexecstream/exec-stream.cpp
39 files changed, 141 insertions(+), 121 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental
refs/changes/18/84118/1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ebbb37..32dc7de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,7 @@
Diff/DiffReader.h
Diff/DiffWriter.h
CollectionHelpers.h
+ common.h
DumpException.h
DumpKind.h
DumpObjects/DumpIpV4User.h
diff --git a/Diff/Changes/DeleteRevisionChange.h
b/Diff/Changes/DeleteRevisionChange.h
index 075808a..f6bda83 100644
--- a/Diff/Changes/DeleteRevisionChange.h
+++ b/Diff/Changes/DeleteRevisionChange.h
@@ -12,6 +12,6 @@
{}
static DeleteRevisionChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/DiffTextGroup.h b/Diff/Changes/DiffTextGroup.h
index 1329423..0b06bda 100644
--- a/Diff/Changes/DiffTextGroup.h
+++ b/Diff/Changes/DiffTextGroup.h
@@ -10,6 +10,6 @@
DiffTextGroup(const std::string &compressedTexts);
static DiffTextGroup Read(std::istream &stream);
- virtual std::uint32_t NewLength() override;
- virtual void WriteInternal() override;
+ virtual std::uint32_t NewLength() OVERRIDE;
+ virtual void WriteInternal() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/FullDeletePageChange.h
b/Diff/Changes/FullDeletePageChange.h
index 1c69653..4cdc7ed 100644
--- a/Diff/Changes/FullDeletePageChange.h
+++ b/Diff/Changes/FullDeletePageChange.h
@@ -12,6 +12,6 @@
{}
static FullDeletePageChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/NewModelFormatChange.h
b/Diff/Changes/NewModelFormatChange.h
index a3fd9b5..934ed90 100644
--- a/Diff/Changes/NewModelFormatChange.h
+++ b/Diff/Changes/NewModelFormatChange.h
@@ -14,6 +14,6 @@
{}
static NewModelFormatChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/NewPageChange.h b/Diff/Changes/NewPageChange.h
index 99787da..482511b 100644
--- a/Diff/Changes/NewPageChange.h
+++ b/Diff/Changes/NewPageChange.h
@@ -13,6 +13,6 @@
{}
static NewPageChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/NewRevisionChange.h b/Diff/Changes/NewRevisionChange.h
index 169e204..46e2028 100644
--- a/Diff/Changes/NewRevisionChange.h
+++ b/Diff/Changes/NewRevisionChange.h
@@ -18,6 +18,6 @@
{}
static NewRevisionChange Read(std::istream &stream, bool withText);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/PageChange.h b/Diff/Changes/PageChange.h
index 9be3c5e..9a8ab89 100644
--- a/Diff/Changes/PageChange.h
+++ b/Diff/Changes/PageChange.h
@@ -31,6 +31,6 @@
bool HasChanges();
static PageChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/PartialDeletePageChange.h
b/Diff/Changes/PartialDeletePageChange.h
index d088806..1a33c19 100644
--- a/Diff/Changes/PartialDeletePageChange.h
+++ b/Diff/Changes/PartialDeletePageChange.h
@@ -12,6 +12,6 @@
{}
static PartialDeletePageChange Read(std::istream &stream);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/RevisionChange.h b/Diff/Changes/RevisionChange.h
index 73b2662..070bc55 100644
--- a/Diff/Changes/RevisionChange.h
+++ b/Diff/Changes/RevisionChange.h
@@ -40,6 +40,6 @@
std::uint8_t newRevisionModelFormatId, bool withText, std::uint8_t
textId);
static RevisionChange Read(std::istream &stream, bool withText);
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/Diff/Changes/SiteInfoChange.h b/Diff/Changes/SiteInfoChange.h
index c338dc7..b3d24a3 100644
--- a/Diff/Changes/SiteInfoChange.h
+++ b/Diff/Changes/SiteInfoChange.h
@@ -16,8 +16,8 @@
: siteInfo(siteInfo), name(name), oldTimestamp(oldTimestamp),
newTimestamp(newTimestamp)
{}
- virtual void WriteInternal() override;
- virtual std::uint32_t NewLength() override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
static SiteInfoChange Read(std::istream &stream);
};
\ No newline at end of file
diff --git a/DumpException.h b/DumpException.h
index 4b89a9f..9c8d9c3 100644
--- a/DumpException.h
+++ b/DumpException.h
@@ -2,12 +2,13 @@
#include <exception>
#include <string>
+#include "common.h"
// http://stackoverflow.com/a/18387764/41071
#ifndef _MSC_VER
-#define NOEXCEPT noexcept
+# define NOEXCEPT noexcept
#else
-#define NOEXCEPT
+# define NOEXCEPT
#endif
class DumpException : public std::exception
@@ -22,7 +23,7 @@
public:
UserException(const std::string &message);
- virtual const char* what() const NOEXCEPT override;
+ virtual const char* what() const NOEXCEPT OVERRIDE;
};
// user exception that was caused by invalid parameters,
diff --git a/DumpObjects/DumpIpV4User.h b/DumpObjects/DumpIpV4User.h
index f76aa0a..c62deea 100644
--- a/DumpObjects/DumpIpV4User.h
+++ b/DumpObjects/DumpIpV4User.h
@@ -14,6 +14,6 @@
DumpIpV4User(shared_ptr<IpV4User> user);
- virtual shared_ptr<User> GetUser() const override;
- virtual uint32_t NewLength() override;
+ virtual shared_ptr<User> GetUser() const OVERRIDE;
+ virtual uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpObjects/DumpIpV6User.h b/DumpObjects/DumpIpV6User.h
index c99c6a8..c97b91a 100644
--- a/DumpObjects/DumpIpV6User.h
+++ b/DumpObjects/DumpIpV6User.h
@@ -14,6 +14,6 @@
DumpIpV6User(shared_ptr<IpV6User> user);
- virtual shared_ptr<User> GetUser() const override;
- virtual uint32_t NewLength() override;
+ virtual shared_ptr<User> GetUser() const OVERRIDE;
+ virtual uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpObjects/DumpNamedUser.h b/DumpObjects/DumpNamedUser.h
index c349d24..c52a38d 100644
--- a/DumpObjects/DumpNamedUser.h
+++ b/DumpObjects/DumpNamedUser.h
@@ -14,6 +14,6 @@
DumpNamedUser(shared_ptr<NamedUser> user);
- virtual shared_ptr<User> GetUser() const override;
- virtual uint32_t NewLength() override;
+ virtual shared_ptr<User> GetUser() const OVERRIDE;
+ virtual uint32_t NewLength() OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpObjects/DumpObject.h b/DumpObjects/DumpObject.h
index 3efc910..160510b 100644
--- a/DumpObjects/DumpObject.h
+++ b/DumpObjects/DumpObject.h
@@ -40,11 +40,11 @@
std::uint32_t savedLength;
DumpObject(std::weak_ptr<WritableDump> dump);
- virtual void WriteInternal() override = 0;
+ virtual void WriteInternal() OVERRIDE = 0;
virtual void UpdateIndex(Offset offset, bool overwrite);
public:
virtual void Write();
- virtual std::uint32_t NewLength() override = 0;
+ virtual std::uint32_t NewLength() OVERRIDE = 0;
std::uint64_t SavedOffset() const;
};
diff --git a/DumpObjects/DumpPage.h b/DumpObjects/DumpPage.h
index 3d1e16d..532a378 100644
--- a/DumpObjects/DumpPage.h
+++ b/DumpObjects/DumpPage.h
@@ -14,17 +14,17 @@
void Load(std::uint32_t pageId);
static Page Read(std::shared_ptr<WritableDump> dump, Offset offset);
protected:
- virtual void WriteInternal() override;
- virtual void UpdateIndex(Offset offset, bool overwrite) override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual void UpdateIndex(Offset offset, bool overwrite) OVERRIDE;
public:
Page page;
DumpPage(std::weak_ptr<WritableDump> dump, std::uint32_t pageId);
DumpPage(std::weak_ptr<WritableDump> dump, Offset offset);
- virtual void Write() override;
+ virtual void Write() OVERRIDE;
void WriteDiff(DiffWriter& diffWriter);
- virtual std::uint32_t NewLength() override;
+ virtual std::uint32_t NewLength() OVERRIDE;
static Page ReadCore(std::istream &stream, bool includeRevisionIds);
static void WriteCore(std::ostream &stream, const Page &page, bool
includeRevisionIds);
diff --git a/DumpObjects/DumpRevision.h b/DumpObjects/DumpRevision.h
index 833fed1..a270c35 100644
--- a/DumpObjects/DumpRevision.h
+++ b/DumpObjects/DumpRevision.h
@@ -30,8 +30,8 @@
void Load(std::uint32_t revisionId);
Revision Read(std::shared_ptr<WritableDump> dump, Offset offset);
protected:
- virtual void WriteInternal() override;
- virtual void UpdateIndex(Offset offset, bool overwrite) override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual void UpdateIndex(Offset offset, bool overwrite) OVERRIDE;
public:
Revision revision;
@@ -40,11 +40,11 @@
std::uint8_t GetModelFormatId(bool &isNew);
void SetModelFormatId(std::uint8_t modelFormatId);
- virtual void Write() override;
+ virtual void Write() OVERRIDE;
// forceDiff set to true forces writing into diff, even if the revision
didn't change
// this is necessary when revision moves between pages because of
undeletion
void Write(DiffWriter *diffWriter, bool forceDiff);
- virtual std::uint32_t NewLength() override;
+ virtual std::uint32_t NewLength() OVERRIDE;
static Revision ReadCore(std::istream &stream, std::uint8_t
&modelFormatId, bool withText);
static void WriteCore(std::ostream &stream, Revision &revision,
std::uint8_t modelFormatId, bool withText);
diff --git a/DumpObjects/DumpSiteInfo.h b/DumpObjects/DumpSiteInfo.h
index e297ab8..6b0a629 100644
--- a/DumpObjects/DumpSiteInfo.h
+++ b/DumpObjects/DumpSiteInfo.h
@@ -8,8 +8,8 @@
private:
void Read(std::shared_ptr<WritableDump> dump, Offset offset);
protected:
- virtual void WriteInternal() override;
- virtual void UpdateIndex(Offset offset, bool overwrite) override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual void UpdateIndex(Offset offset, bool overwrite) OVERRIDE;
public:
DumpSiteInfo(std::weak_ptr<WritableDump> dump);
@@ -18,7 +18,7 @@
SiteInfo siteInfo;
- virtual uint32_t NewLength() override;
+ virtual uint32_t NewLength() OVERRIDE;
void CheckName(const std::string &name, bool canBeEmpty = false) const;
// if shouldBeDifferent is false, makes sure that the timestamps are the
same
diff --git a/DumpObjects/DumpUser.h b/DumpObjects/DumpUser.h
index 5d0cfa5..3e3e4ba 100644
--- a/DumpObjects/DumpUser.h
+++ b/DumpObjects/DumpUser.h
@@ -13,12 +13,12 @@
using DumpObjectBase::WriteValue;
using DumpObjectBase::ValueSize;
- virtual void WriteInternal() override = 0;
+ virtual void WriteInternal() OVERRIDE = 0;
public:
static unique_ptr<DumpUser> Create(shared_ptr<User> user);
static unique_ptr<DumpUser> Read(RevisionFlags flags, istream &stream);
void Write(ostream *stream);
virtual shared_ptr<User> GetUser() const = 0;
- virtual uint32_t NewLength() override = 0;
+ virtual uint32_t NewLength() OVERRIDE = 0;
};
\ No newline at end of file
diff --git a/DumpObjects/FileHeader.h b/DumpObjects/FileHeader.h
index 137c524..9c7f1e1 100644
--- a/DumpObjects/FileHeader.h
+++ b/DumpObjects/FileHeader.h
@@ -26,8 +26,8 @@
static FileHeader Read(ReadableDump const &dump);
- virtual void Write() override;
- virtual std::uint32_t NewLength() override;
+ virtual void Write() OVERRIDE;
+ virtual std::uint32_t NewLength() OVERRIDE;
DumpKind Kind;
diff --git a/DumpObjects/TextGroup.h b/DumpObjects/TextGroup.h
index 0ea50e3..04e48d7 100644
--- a/DumpObjects/TextGroup.h
+++ b/DumpObjects/TextGroup.h
@@ -16,14 +16,14 @@
bool IsEmpty() const;
protected:
- virtual void WriteInternal() override;
- virtual void UpdateIndex(Offset offset, bool overwrite) override;
+ virtual void WriteInternal() OVERRIDE;
+ virtual void UpdateIndex(Offset offset, bool overwrite) OVERRIDE;
public:
std::string compressedTexts;
TextGroup(std::weak_ptr<WritableDump> dump, std::uint32_t textGroupId);
- virtual uint32_t NewLength() override;
+ virtual uint32_t NewLength() OVERRIDE;
std::uint32_t GetTextGroupId() const;
diff --git a/DumpWriters/ArticlesWriterWrapper.h
b/DumpWriters/ArticlesWriterWrapper.h
index fd7c99b..84423fa 100644
--- a/DumpWriters/ArticlesWriterWrapper.h
+++ b/DumpWriters/ArticlesWriterWrapper.h
@@ -11,8 +11,8 @@
: WriterWrapper(std::move(wrapped)), pageInlcuded(false)
{}
- virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) override;
- virtual void AddRevision(const std::shared_ptr<const Revision> revision)
override;
- virtual void EndPage() override;
- virtual void SetDumpKind(DumpKind dumpKind) override;
+ virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) OVERRIDE;
+ virtual void AddRevision(const std::shared_ptr<const Revision> revision)
OVERRIDE;
+ virtual void EndPage() OVERRIDE;
+ virtual void SetDumpKind(DumpKind dumpKind) OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpWriters/CompositeWriter.h b/DumpWriters/CompositeWriter.h
index 2967d3f..c917398 100644
--- a/DumpWriters/CompositeWriter.h
+++ b/DumpWriters/CompositeWriter.h
@@ -4,6 +4,7 @@
#include <vector>
#include <functional>
#include "IDumpWriter.h"
+#include "../common.h"
class CompositeWriter : public IDumpWriter
{
@@ -15,10 +16,10 @@
: writers(std::move(writers)), getTextFunction(getTextFunction)
{}
- virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) override;
- virtual void AddRevision(const std::shared_ptr<const Revision> revision)
override;
- virtual void EndPage() override;
- virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
override;
- virtual void SetDumpKind(DumpKind dumpKind) override;
- virtual void Complete() override;
+ virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) OVERRIDE;
+ virtual void AddRevision(const std::shared_ptr<const Revision> revision)
OVERRIDE;
+ virtual void EndPage() OVERRIDE;
+ virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
OVERRIDE;
+ virtual void SetDumpKind(DumpKind dumpKind) OVERRIDE;
+ virtual void Complete() OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpWriters/CurrentWriterWrapper.h
b/DumpWriters/CurrentWriterWrapper.h
index b763d80..f7e56d7 100644
--- a/DumpWriters/CurrentWriterWrapper.h
+++ b/DumpWriters/CurrentWriterWrapper.h
@@ -11,7 +11,7 @@
: WriterWrapper(std::move(wrapped))
{}
- virtual void AddRevision(const std::shared_ptr<const Revision> revision)
override;
- virtual void EndPage() override;
- virtual void SetDumpKind(DumpKind dumpKind) override;
+ virtual void AddRevision(const std::shared_ptr<const Revision> revision)
OVERRIDE;
+ virtual void EndPage() OVERRIDE;
+ virtual void SetDumpKind(DumpKind dumpKind) OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpWriters/DumpWriter.h b/DumpWriters/DumpWriter.h
index c70cbc9..13c8331 100644
--- a/DumpWriters/DumpWriter.h
+++ b/DumpWriters/DumpWriter.h
@@ -24,10 +24,10 @@
public:
DumpWriter(std::shared_ptr<WritableDump> dump, bool withText,
std::unique_ptr<DiffWriter> diffWriter = nullptr);
- virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) override;
- virtual void AddRevision(const std::shared_ptr<const Revision> revision)
override;
- virtual void EndPage() override;
- virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
override;
- virtual void SetDumpKind(DumpKind dumpKind) override;
- virtual void Complete() override;
+ virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) OVERRIDE;
+ virtual void AddRevision(const std::shared_ptr<const Revision> revision)
OVERRIDE;
+ virtual void EndPage() OVERRIDE;
+ virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
OVERRIDE;
+ virtual void SetDumpKind(DumpKind dumpKind) OVERRIDE;
+ virtual void Complete() OVERRIDE;
};
\ No newline at end of file
diff --git a/DumpWriters/WriterWrapper.h b/DumpWriters/WriterWrapper.h
index d520177..555ff68 100644
--- a/DumpWriters/WriterWrapper.h
+++ b/DumpWriters/WriterWrapper.h
@@ -1,6 +1,7 @@
#pragma once
#include "IDumpWriter.h"
+#include "../common.h"
class WriterWrapper : public IDumpWriter
{
@@ -11,10 +12,10 @@
: wrapped(std::move(wrapped))
{}
- virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) override;
- virtual void AddRevision(const std::shared_ptr<const Revision> revision)
override;
- virtual void EndPage() override;
- virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
override;
- virtual void SetDumpKind(DumpKind dumpKind) override = 0;
- virtual void Complete() override;
+ virtual void StartPage(const std::shared_ptr<const Page> page, bool
titleWithNamespace) OVERRIDE;
+ virtual void AddRevision(const std::shared_ptr<const Revision> revision)
OVERRIDE;
+ virtual void EndPage() OVERRIDE;
+ virtual void SetSiteInfo(const std::shared_ptr<const SiteInfo> siteInfo)
OVERRIDE;
+ virtual void SetDumpKind(DumpKind dumpKind) OVERRIDE = 0;
+ virtual void Complete() OVERRIDE;
};
\ No newline at end of file
diff --git a/Incremental dumps.vcxproj b/Incremental dumps.vcxproj
index 81882bb..0c176c6 100644
--- a/Incremental dumps.vcxproj
+++ b/Incremental dumps.vcxproj
@@ -105,6 +105,7 @@
<ClCompile Include="DumpObjects\DumpSiteInfo.cpp" />
<ClCompile Include="DumpObjects\FileHeader.cpp" />
<ClInclude Include="CollectionHelpers.h" />
+ <ClInclude Include="common.h" />
<ClInclude Include="Diff\ChangeProcessor.h" />
<ClInclude Include="Diff\Changes\Change.h" />
<ClInclude Include="Diff\Changes\DeleteRevisionChange.h" />
diff --git a/Indexes/IndexInnerNode.h b/Indexes/IndexInnerNode.h
index 8626bd9..d76c928 100644
--- a/Indexes/IndexInnerNode.h
+++ b/Indexes/IndexInnerNode.h
@@ -23,30 +23,30 @@
void AfterAdd(std::uint16_t updatedChildIndex);
protected:
- virtual void WriteInternal() override;
+ virtual void WriteInternal() OVERRIDE;
public:
static std::unique_ptr<IndexNode<TKey, TValue>>
Read(std::weak_ptr<WritableDump> dump, std::istream &stream);
IndexInnerNode(std::weak_ptr<WritableDump> dump);
IndexInnerNode(std::weak_ptr<WritableDump> dump, SplitResult splitResult);
- virtual void Write() override;
+ virtual void Write() OVERRIDE;
- virtual uint32_t NewLength() override;
+ virtual uint32_t NewLength() OVERRIDE;
- virtual TValue Get(TKey key) override;
- virtual void Add(TKey key, TValue value) override;
- virtual void AddOrUpdate(TKey key, TValue value) override;
- virtual void Remove(TKey key) override;
+ virtual TValue Get(TKey key) OVERRIDE;
+ virtual void Add(TKey key, TValue value) OVERRIDE;
+ virtual void AddOrUpdate(TKey key, TValue value) OVERRIDE;
+ virtual void Remove(TKey key) OVERRIDE;
- virtual std::uint32_t RealLength() override;
- virtual SplitResult Split() override;
+ virtual std::uint32_t RealLength() OVERRIDE;
+ virtual SplitResult Split() OVERRIDE;
- virtual std::uint32_t NodesCount() override;
- virtual void ClearCachedInternal() override;
+ virtual std::uint32_t NodesCount() OVERRIDE;
+ virtual void ClearCachedInternal() OVERRIDE;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> begin() override;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> end() override;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> begin() OVERRIDE;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> end() OVERRIDE;
};
#include "IndexInnerNode.tpp"
diff --git a/Indexes/IndexLeafNode.h b/Indexes/IndexLeafNode.h
index 78c74ef..36daf16 100644
--- a/Indexes/IndexLeafNode.h
+++ b/Indexes/IndexLeafNode.h
@@ -13,7 +13,7 @@
private:
std::map<TKey, TValue> indexMap;
protected:
- virtual void WriteInternal() override;
+ virtual void WriteInternal() OVERRIDE;
public:
static std::unique_ptr<IndexNode<TKey, TValue>>
Read(std::weak_ptr<WritableDump> dump, std::istream &stream);
@@ -23,21 +23,21 @@
using DumpObjectBase::WriteValue;
using DumpObjectBase::ValueSize;
- virtual uint32_t NewLength() override;
+ virtual uint32_t NewLength() OVERRIDE;
- virtual TValue Get(TKey key) override;
- virtual void Add(TKey key, TValue value) override;
- virtual void AddOrUpdate(TKey key, TValue value) override;
- virtual void Remove(TKey key) override;
+ virtual TValue Get(TKey key) OVERRIDE;
+ virtual void Add(TKey key, TValue value) OVERRIDE;
+ virtual void AddOrUpdate(TKey key, TValue value) OVERRIDE;
+ virtual void Remove(TKey key) OVERRIDE;
- virtual std::uint32_t RealLength() override;
- virtual SplitResult Split() override;
+ virtual std::uint32_t RealLength() OVERRIDE;
+ virtual SplitResult Split() OVERRIDE;
- virtual std::uint32_t NodesCount() override;
- virtual void ClearCachedInternal() override;
+ virtual std::uint32_t NodesCount() OVERRIDE;
+ virtual void ClearCachedInternal() OVERRIDE;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> begin() override;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> end() override;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> begin() OVERRIDE;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> end() OVERRIDE;
};
#include "IndexLeafNode.tpp"
diff --git a/Indexes/IndexNode.h b/Indexes/IndexNode.h
index a0bbef6..acd0949 100644
--- a/Indexes/IndexNode.h
+++ b/Indexes/IndexNode.h
@@ -45,7 +45,7 @@
IndexNode(std::weak_ptr<WritableDump> dump);
- virtual void Write() override;
+ virtual void Write() OVERRIDE;
void Write(bool force);
virtual TValue Get(TKey key) = 0;
diff --git a/Indexes/Iterators/IndexInnerIterator.h
b/Indexes/Iterators/IndexInnerIterator.h
index 8ab6754..568a2de 100644
--- a/Indexes/Iterators/IndexInnerIterator.h
+++ b/Indexes/Iterators/IndexInnerIterator.h
@@ -16,12 +16,12 @@
IndexInnerIterator(IndexInnerNode<TKey, TValue> *node, bool isBegin);
IndexInnerIterator(const IndexInnerIterator<TKey, TValue>& other);
public:
- virtual const std::pair<TKey, TValue> operator *() const override;
- virtual IndexInnerIterator& operator ++() override;
- virtual bool Equals(const IndexNodeIterator<TKey, TValue> *other) const
override;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> Clone() const
override;
+ virtual const std::pair<TKey, TValue> operator *() const OVERRIDE;
+ virtual IndexInnerIterator& operator ++() OVERRIDE;
+ virtual bool Equals(const IndexNodeIterator<TKey, TValue> *other) const
OVERRIDE;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> Clone() const
OVERRIDE;
- virtual void ClearNodeCacheIfTooBig() override;
+ virtual void ClearNodeCacheIfTooBig() OVERRIDE;
virtual ~IndexInnerIterator();
};
diff --git a/Indexes/Iterators/IndexLeafIterator.h
b/Indexes/Iterators/IndexLeafIterator.h
index ebba9c1..572ad79 100644
--- a/Indexes/Iterators/IndexLeafIterator.h
+++ b/Indexes/Iterators/IndexLeafIterator.h
@@ -20,12 +20,12 @@
IndexLeafIterator(IndexLeafNode<TKey, TValue> *node, MapIterator
mapIterator);
IndexLeafIterator(const IndexLeafIterator<TKey, TValue>& other);
public:
- virtual const pair<TKey, TValue> operator *() const override;
- virtual IndexLeafIterator& operator ++() override;
- virtual bool Equals(const IndexNodeIterator<TKey, TValue> *other) const
override;
- virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> Clone() const
override;
+ virtual const pair<TKey, TValue> operator *() const OVERRIDE;
+ virtual IndexLeafIterator& operator ++() OVERRIDE;
+ virtual bool Equals(const IndexNodeIterator<TKey, TValue> *other) const
OVERRIDE;
+ virtual std::unique_ptr<IndexNodeIterator<TKey, TValue>> Clone() const
OVERRIDE;
- virtual void ClearNodeCacheIfTooBig() override;
+ virtual void ClearNodeCacheIfTooBig() OVERRIDE;
virtual ~IndexLeafIterator();
};
diff --git a/Objects/IpV4User.h b/Objects/IpV4User.h
index 2108120..6df63ce 100644
--- a/Objects/IpV4User.h
+++ b/Objects/IpV4User.h
@@ -1,6 +1,7 @@
#pragma once
#include "User.h"
+#include "../common.h"
class IpV4User : public User
{
@@ -15,7 +16,7 @@
uint32_t Address;
- virtual bool Equals(const User &second) const override;
+ virtual bool Equals(const User &second) const OVERRIDE;
- virtual RevisionFlags UserKind() const override;
+ virtual RevisionFlags UserKind() const OVERRIDE;
};
\ No newline at end of file
diff --git a/Objects/IpV6User.h b/Objects/IpV6User.h
index f2abbc6..bee5128 100644
--- a/Objects/IpV6User.h
+++ b/Objects/IpV6User.h
@@ -2,6 +2,7 @@
#include <array>
#include "User.h"
+#include "../common.h"
class IpV6User : public User
{
@@ -16,7 +17,7 @@
std::array<uint16_t, 8> Address;
- virtual bool Equals(const User &second) const override;
+ virtual bool Equals(const User &second) const OVERRIDE;
- virtual RevisionFlags UserKind() const override;
+ virtual RevisionFlags UserKind() const OVERRIDE;
};
\ No newline at end of file
diff --git a/Objects/NamedUser.h b/Objects/NamedUser.h
index f418b00..ebc51e7 100644
--- a/Objects/NamedUser.h
+++ b/Objects/NamedUser.h
@@ -1,13 +1,14 @@
#pragma once
#include "User.h"
+#include "../common.h"
class NamedUser : public User
{
public:
NamedUser(std::uint32_t userId, string userName);
- virtual bool Equals(const User &second) const override;
+ virtual bool Equals(const User &second) const OVERRIDE;
- virtual RevisionFlags UserKind() const override;
+ virtual RevisionFlags UserKind() const OVERRIDE;
};
\ No newline at end of file
diff --git a/XmlInput/WrapperInputStream.h b/XmlInput/WrapperInputStream.h
index fd1df61..2cecc3e 100644
--- a/XmlInput/WrapperInputStream.h
+++ b/XmlInput/WrapperInputStream.h
@@ -12,7 +12,7 @@
: wrapped(wrapped), sideAction(sideAction)
{}
- virtual int read(XML_Char *buf, size_t bufLen) override
+ virtual int read(XML_Char *buf, size_t bufLen) OVERRIDE
{
if (sideAction != nullptr)
sideAction();
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..06bebb5
--- /dev/null
+++ b/common.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#define OVERRIDE override
+
+#ifdef __GNUC__
+# include <features.h>
+# if !__GNUC_PREREQ(4,7)
+# undef OVERRIDE
+# define OVERRIDE
+# endif
+#endif
\ No newline at end of file
diff --git a/libexecstream/exec-stream.cpp b/libexecstream/exec-stream.cpp
index 06d3379..e667162 100644
--- a/libexecstream/exec-stream.cpp
+++ b/libexecstream/exec-stream.cpp
@@ -27,6 +27,7 @@
*/
#include "exec-stream.h"
+#include "../common.h"
#include <list>
#include <vector>
@@ -236,10 +237,10 @@
void clear();
protected:
- virtual int_type underflow() override;
- virtual int_type overflow( int_type c ) override;
- virtual int sync() override;
- virtual std::streamsize showmanyc() override;
+ virtual int_type underflow() OVERRIDE;
+ virtual int_type overflow( int_type c ) OVERRIDE;
+ virtual int sync() OVERRIDE;
+ virtual std::streamsize showmanyc() OVERRIDE;
private:
bool send_buffer();
--
To view, visit https://gerrit.wikimedia.org/r/84118
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I32293346ba31fa90694f23a37500428658f52d31
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/incremental
Gerrit-Branch: gsoc
Gerrit-Owner: Petr Onderka <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits