From fa199a09ddf63d889f044d7cb8cadf71a5bd0e24 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Mon, 13 Apr 2020 17:30:36 -0230 Subject: [PATCH] Fix 'ovveride' warning from clang. Convert 'template class' to the more modern 'template typename'. --- src/common/LinkedObjectPool.hxx | 2 +- src/common/Stack.hxx | 2 +- src/common/Vec.hxx | 6 +++--- src/common/bspf.hxx | 6 +++--- src/emucore/Cart3E.hxx | 2 +- src/emucore/DispatchResult.hxx | 2 +- src/emucore/tia/DelayQueue.hxx | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/common/LinkedObjectPool.hxx b/src/common/LinkedObjectPool.hxx index ab4a2fcbd..7c35439e3 100644 --- a/src/common/LinkedObjectPool.hxx +++ b/src/common/LinkedObjectPool.hxx @@ -49,7 +49,7 @@ */ namespace Common { -template +template class LinkedObjectPool { public: diff --git a/src/common/Stack.hxx b/src/common/Stack.hxx index aac9c28b2..e3b2afd87 100644 --- a/src/common/Stack.hxx +++ b/src/common/Stack.hxx @@ -27,7 +27,7 @@ */ namespace Common { -template +template class FixedStack { private: diff --git a/src/common/Vec.hxx b/src/common/Vec.hxx index 10e0c492e..7d102a785 100644 --- a/src/common/Vec.hxx +++ b/src/common/Vec.hxx @@ -22,19 +22,19 @@ namespace Vec { -template +template void append(vector& dst, const vector& src) { dst.insert(dst.cend(), src.cbegin(), src.cend()); } -template +template void insertAt(vector& dst, uInt32 idx, const T& element) { dst.insert(dst.cbegin()+idx, element); } -template +template void removeAt(vector& dst, uInt32 idx) { dst.erase(dst.cbegin()+idx); diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index e7cc60024..18c60bd2a 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -119,16 +119,16 @@ namespace BSPF #endif // Make 2D-arrays using std::array less verbose - template + template using array2D = std::array, ROW>; // Combines 'max' and 'min', and clamps value to the upper/lower value // if it is outside the specified range - template inline T clamp(T val, T lower, T upper) + template inline T clamp(T val, T lower, T upper) { return (val < lower) ? lower : (val > upper) ? upper : val; } - template inline void clamp(T& val, T lower, T upper, T setVal) + template inline void clamp(T& val, T lower, T upper, T setVal) { if(val < lower || val > upper) val = setVal; } diff --git a/src/emucore/Cart3E.hxx b/src/emucore/Cart3E.hxx index 021497c82..e2382babb 100644 --- a/src/emucore/Cart3E.hxx +++ b/src/emucore/Cart3E.hxx @@ -117,7 +117,7 @@ class Cartridge3E : public Cartridge @param bank The bank to get the size for @return The bank's size */ - virtual uInt16 bankSize(uInt16 bank = 0) const; + virtual uInt16 bankSize(uInt16 bank = 0) const override; /** Patch the cartridge ROM. diff --git a/src/emucore/DispatchResult.hxx b/src/emucore/DispatchResult.hxx index 4ce172aeb..6d76cf5ce 100644 --- a/src/emucore/DispatchResult.hxx +++ b/src/emucore/DispatchResult.hxx @@ -55,7 +55,7 @@ class DispatchResult if (myStatus != status) throw runtime_error("invalid status for operation"); } - template void assertStatus(Status status, Ts... more) const + template void assertStatus(Status status, Ts... more) const { if (myStatus == status) return; diff --git a/src/emucore/tia/DelayQueue.hxx b/src/emucore/tia/DelayQueue.hxx index d3e7e544b..996bde72e 100644 --- a/src/emucore/tia/DelayQueue.hxx +++ b/src/emucore/tia/DelayQueue.hxx @@ -41,7 +41,7 @@ class DelayQueue : public Serializable void reset(); - template void execute(T executor); + template void execute(T executor); /** Serializable methods (see that class for more information). @@ -103,7 +103,7 @@ void DelayQueue::reset() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - template -template +template void DelayQueue::execute(T executor) { DelayQueueMember& currentMember = myMembers[myIndex];