Fix 'ovveride' warning from clang.

Convert 'template class' to the more modern 'template typename'.
This commit is contained in:
Stephen Anthony 2020-04-13 17:30:36 -02:30
parent c4bda8a09f
commit 66bd5c49a6
7 changed files with 12 additions and 12 deletions

View File

@ -49,7 +49,7 @@
*/ */
namespace Common { namespace Common {
template <class T, uInt32 CAPACITY = 100> template <typename T, uInt32 CAPACITY = 100>
class LinkedObjectPool class LinkedObjectPool
{ {
public: public:

View File

@ -27,7 +27,7 @@
*/ */
namespace Common { namespace Common {
template <class T, uInt32 CAPACITY = 50> template <typename T, uInt32 CAPACITY = 50>
class FixedStack class FixedStack
{ {
private: private:

View File

@ -22,19 +22,19 @@
namespace Vec { namespace Vec {
template<class T> template<typename T>
void append(vector<T>& dst, const vector<T>& src) void append(vector<T>& dst, const vector<T>& src)
{ {
dst.insert(dst.cend(), src.cbegin(), src.cend()); dst.insert(dst.cend(), src.cbegin(), src.cend());
} }
template<class T> template<typename T>
void insertAt(vector<T>& dst, uInt32 idx, const T& element) void insertAt(vector<T>& dst, uInt32 idx, const T& element)
{ {
dst.insert(dst.cbegin()+idx, element); dst.insert(dst.cbegin()+idx, element);
} }
template<class T> template<typename T>
void removeAt(vector<T>& dst, uInt32 idx) void removeAt(vector<T>& dst, uInt32 idx)
{ {
dst.erase(dst.cbegin()+idx); dst.erase(dst.cbegin()+idx);

View File

@ -119,16 +119,16 @@ namespace BSPF
#endif #endif
// Make 2D-arrays using std::array less verbose // Make 2D-arrays using std::array less verbose
template<class T, size_t ROW, size_t COL> template<typename T, size_t ROW, size_t COL>
using array2D = std::array<std::array<T, COL>, ROW>; using array2D = std::array<std::array<T, COL>, ROW>;
// Combines 'max' and 'min', and clamps value to the upper/lower value // Combines 'max' and 'min', and clamps value to the upper/lower value
// if it is outside the specified range // if it is outside the specified range
template<class T> inline T clamp(T val, T lower, T upper) template<typename T> inline T clamp(T val, T lower, T upper)
{ {
return (val < lower) ? lower : (val > upper) ? upper : val; return (val < lower) ? lower : (val > upper) ? upper : val;
} }
template<class T> inline void clamp(T& val, T lower, T upper, T setVal) template<typename T> inline void clamp(T& val, T lower, T upper, T setVal)
{ {
if(val < lower || val > upper) val = setVal; if(val < lower || val > upper) val = setVal;
} }

View File

@ -117,7 +117,7 @@ class Cartridge3E : public Cartridge
@param bank The bank to get the size for @param bank The bank to get the size for
@return The bank's size @return The bank's size
*/ */
virtual uInt16 bankSize(uInt16 bank = 0) const; virtual uInt16 bankSize(uInt16 bank = 0) const override;
/** /**
Patch the cartridge ROM. Patch the cartridge ROM.

View File

@ -55,7 +55,7 @@ class DispatchResult
if (myStatus != status) throw runtime_error("invalid status for operation"); if (myStatus != status) throw runtime_error("invalid status for operation");
} }
template<class ...Ts> void assertStatus(Status status, Ts... more) const template<typename ...Ts> void assertStatus(Status status, Ts... more) const
{ {
if (myStatus == status) return; if (myStatus == status) return;

View File

@ -41,7 +41,7 @@ class DelayQueue : public Serializable
void reset(); void reset();
template<class T> void execute(T executor); template<typename T> void execute(T executor);
/** /**
Serializable methods (see that class for more information). Serializable methods (see that class for more information).
@ -103,7 +103,7 @@ void DelayQueue<length, capacity>::reset()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
template<unsigned length, unsigned capacity> template<unsigned length, unsigned capacity>
template<class T> template<typename T>
void DelayQueue<length, capacity>::execute(T executor) void DelayQueue<length, capacity>::execute(T executor)
{ {
DelayQueueMember<capacity>& currentMember = myMembers[myIndex]; DelayQueueMember<capacity>& currentMember = myMembers[myIndex];