Merge #10631: Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class
aa95947 Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class (practicalswift) Tree-SHA512: 3835e9b4ceaa4b2db485a25dfa3e5fe50c2e3ecb22ca9d5331aed7728aa496d4378fb84c0a1a3c47b0adecc10a00bca99cc239cbaf94cf2ce5b4cda497db6023
This commit is contained in:
parent
77088082ea
commit
9bcadebf77
@ -148,9 +148,9 @@ class Win32LockedPageAllocator: public LockedPageAllocator
|
||||
{
|
||||
public:
|
||||
Win32LockedPageAllocator();
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess);
|
||||
void FreeLocked(void* addr, size_t len);
|
||||
size_t GetLimit();
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess) override;
|
||||
void FreeLocked(void* addr, size_t len) override;
|
||||
size_t GetLimit() override;
|
||||
private:
|
||||
size_t page_size;
|
||||
};
|
||||
@ -200,9 +200,9 @@ class PosixLockedPageAllocator: public LockedPageAllocator
|
||||
{
|
||||
public:
|
||||
PosixLockedPageAllocator();
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess);
|
||||
void FreeLocked(void* addr, size_t len);
|
||||
size_t GetLimit();
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess) override;
|
||||
void FreeLocked(void* addr, size_t len) override;
|
||||
size_t GetLimit() override;
|
||||
private:
|
||||
size_t page_size;
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ class TestLockedPageAllocator: public LockedPageAllocator
|
||||
{
|
||||
public:
|
||||
TestLockedPageAllocator(int count_in, int lockedcount_in): count(count_in), lockedcount(lockedcount_in) {}
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess)
|
||||
void* AllocateLocked(size_t len, bool *lockingSuccess) override
|
||||
{
|
||||
*lockingSuccess = false;
|
||||
if (count > 0) {
|
||||
@ -146,10 +146,10 @@ public:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void FreeLocked(void* addr, size_t len)
|
||||
void FreeLocked(void* addr, size_t len) override
|
||||
{
|
||||
}
|
||||
size_t GetLimit()
|
||||
size_t GetLimit() override
|
||||
{
|
||||
return std::numeric_limits<size_t>::max();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user