Merge pull request #2708 from lioncash/override
MMIO: Add missing override specifiers
This commit is contained in:
commit
b6ee886540
|
@ -43,7 +43,7 @@ public:
|
||||||
|
|
||||||
virtual ~ConstantHandlingMethod() {}
|
virtual ~ConstantHandlingMethod() {}
|
||||||
|
|
||||||
virtual void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const
|
void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitConstant(value_);
|
v.VisitConstant(value_);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,8 @@ class NopHandlingMethod : public WriteHandlingMethod<T>
|
||||||
public:
|
public:
|
||||||
NopHandlingMethod() {}
|
NopHandlingMethod() {}
|
||||||
virtual ~NopHandlingMethod() {}
|
virtual ~NopHandlingMethod() {}
|
||||||
virtual void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const
|
|
||||||
|
void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitNop();
|
v.VisitNop();
|
||||||
}
|
}
|
||||||
|
@ -91,12 +92,12 @@ public:
|
||||||
|
|
||||||
virtual ~DirectHandlingMethod() {}
|
virtual ~DirectHandlingMethod() {}
|
||||||
|
|
||||||
virtual void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const
|
void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitDirect(addr_, mask_);
|
v.VisitDirect(addr_, mask_);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const
|
void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitDirect(addr_, mask_);
|
v.VisitDirect(addr_, mask_);
|
||||||
}
|
}
|
||||||
|
@ -146,12 +147,12 @@ public:
|
||||||
|
|
||||||
virtual ~ComplexHandlingMethod() {}
|
virtual ~ComplexHandlingMethod() {}
|
||||||
|
|
||||||
virtual void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const
|
void AcceptReadVisitor(ReadHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitComplex(&read_lambda_);
|
v.VisitComplex(&read_lambda_);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const
|
void AcceptWriteVisitor(WriteHandlingMethodVisitor<T>& v) const override
|
||||||
{
|
{
|
||||||
v.VisitComplex(&write_lambda_);
|
v.VisitComplex(&write_lambda_);
|
||||||
}
|
}
|
||||||
|
@ -300,17 +301,17 @@ void ReadHandler<T>::ResetMethod(ReadHandlingMethod<T>* method)
|
||||||
{
|
{
|
||||||
std::function<T(u32)> ret;
|
std::function<T(u32)> ret;
|
||||||
|
|
||||||
virtual void VisitConstant(T value)
|
void VisitConstant(T value) override
|
||||||
{
|
{
|
||||||
ret = [value](u32) { return value; };
|
ret = [value](u32) { return value; };
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void VisitDirect(const T* addr, u32 mask)
|
void VisitDirect(const T* addr, u32 mask) override
|
||||||
{
|
{
|
||||||
ret = [addr, mask](u32) { return *addr & mask; };
|
ret = [addr, mask](u32) { return *addr & mask; };
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void VisitComplex(const std::function<T(u32)>* lambda)
|
void VisitComplex(const std::function<T(u32)>* lambda) override
|
||||||
{
|
{
|
||||||
ret = *lambda;
|
ret = *lambda;
|
||||||
}
|
}
|
||||||
|
@ -356,17 +357,17 @@ void WriteHandler<T>::ResetMethod(WriteHandlingMethod<T>* method)
|
||||||
{
|
{
|
||||||
std::function<void(u32, T)> ret;
|
std::function<void(u32, T)> ret;
|
||||||
|
|
||||||
virtual void VisitNop()
|
void VisitNop() override
|
||||||
{
|
{
|
||||||
ret = [](u32, T) {};
|
ret = [](u32, T) {};
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void VisitDirect(T* ptr, u32 mask)
|
void VisitDirect(T* ptr, u32 mask) override
|
||||||
{
|
{
|
||||||
ret = [ptr, mask](u32, T val) { *ptr = val & mask; };
|
ret = [ptr, mask](u32, T val) { *ptr = val & mask; };
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void VisitComplex(const std::function<void(u32, T)>* lambda)
|
void VisitComplex(const std::function<void(u32, T)>* lambda) override
|
||||||
{
|
{
|
||||||
ret = *lambda;
|
ret = *lambda;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue