Check that C++ compiler supports override keyword

If the compiler supports override, define CXX11_OVERRIDE as override,
otherwise define it as empty. Use CXX11_OVERRIDE instead of override.
This commit is contained in:
Tatsuhiro Tsujikawa 2013-07-06 15:54:03 +09:00
parent cce5b3206a
commit 28d5c7408f
15 changed files with 54 additions and 25 deletions

View file

@ -53,7 +53,7 @@ public:
public:
virtual std::unique_ptr<BtRequestMessage>
createRequestMessage(const std::shared_ptr<Piece>& piece,
size_t blockIndex) override
size_t blockIndex) CXX11_OVERRIDE
{
return make_unique<BtRequestMessage>(piece->getIndex(), 0, 0,
blockIndex);
@ -62,7 +62,8 @@ public:
class MockBtMessageDispatcher2 : public MockBtMessageDispatcher {
public:
virtual bool isOutstandingRequest(size_t index, size_t blockIndex) override
virtual bool isOutstandingRequest(size_t index, size_t blockIndex)
CXX11_OVERRIDE
{
return index == 0 && blockIndex == 0;
}