mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
JANITORIAL: Fix GCC 14 warnings
Fix repetitive warnings about template-id in constructors and destructors. This ensures C++20 compatibility. Warnings are encountered when compiling with GCC 14.
This commit is contained in:
parent
32f3bfea6c
commit
86a9fd66c5
@ -41,8 +41,8 @@ namespace Common {
|
||||
template<class T>
|
||||
class Singleton : NonCopyable {
|
||||
private:
|
||||
Singleton<T>(const Singleton<T> &);
|
||||
Singleton<T> &operator=(const Singleton<T> &);
|
||||
Singleton(const Singleton&);
|
||||
Singleton &operator=(const Singleton &);
|
||||
|
||||
/**
|
||||
* The default object factory used by the template class Singleton.
|
||||
@ -88,8 +88,8 @@ public:
|
||||
T::destroyInstance();
|
||||
}
|
||||
protected:
|
||||
Singleton<T>() { }
|
||||
virtual ~Singleton<T>() { }
|
||||
Singleton() { }
|
||||
virtual ~Singleton() { }
|
||||
|
||||
typedef T SingletonBaseType;
|
||||
|
||||
|
@ -44,7 +44,7 @@ class FixedStack {
|
||||
public:
|
||||
typedef uint size_type;
|
||||
|
||||
FixedStack<T, MAX_SIZE>() : _size(0) {}
|
||||
FixedStack() : _size(0) {}
|
||||
|
||||
bool empty() const {
|
||||
return _size <= 0;
|
||||
@ -106,8 +106,8 @@ private:
|
||||
public:
|
||||
typedef typename Array<T>::size_type size_type;
|
||||
|
||||
Stack<T>() {}
|
||||
Stack<T>(const Array<T> &stackContent) : _stack(stackContent) {}
|
||||
Stack() {}
|
||||
Stack(const Array<T> &stackContent) : _stack(stackContent) {}
|
||||
|
||||
bool empty() const {
|
||||
return _stack.empty();
|
||||
|
@ -49,7 +49,7 @@ protected:
|
||||
template <class T>
|
||||
class GraphicsMan_v1 : public GraphicsMan {
|
||||
public:
|
||||
GraphicsMan_v1<T>(T &display) : _display(display) { this->setBounds(Common::Rect(280, 160)); }
|
||||
GraphicsMan_v1(T &display) : _display(display) { this->setBounds(Common::Rect(280, 160)); }
|
||||
|
||||
void drawLine(const Common::Point &p1, const Common::Point &p2, byte color) const override;
|
||||
void drawShape(Common::ReadStream &shape, Common::Point &pos, byte rotation = 0, byte scaling = 1, byte color = 0x7f) const override;
|
||||
@ -69,7 +69,7 @@ private:
|
||||
template <class T>
|
||||
class GraphicsMan_v2 : public GraphicsMan_v1<T> {
|
||||
public:
|
||||
GraphicsMan_v2<T>(T &display) : GraphicsMan_v1<T>(display), _color(0) { }
|
||||
GraphicsMan_v2(T &display) : GraphicsMan_v1<T>(display), _color(0) { }
|
||||
void drawPic(Common::SeekableReadStream &pic, const Common::Point &pos) override;
|
||||
|
||||
protected:
|
||||
@ -96,7 +96,7 @@ private:
|
||||
template <class T>
|
||||
class GraphicsMan_v3 : public GraphicsMan_v2<T> {
|
||||
public:
|
||||
GraphicsMan_v3<T>(T &display) : GraphicsMan_v2<T>(display) { }
|
||||
GraphicsMan_v3(T &display) : GraphicsMan_v2<T>(display) { }
|
||||
|
||||
private:
|
||||
void fillRowLeft(Common::Point p, const byte pattern, const bool stopBit) override;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
* Constructor from other fixed-point formats.
|
||||
*/
|
||||
template<typename T2, uint otherTB, uint otherDB>
|
||||
explicit TFixedInt<T, totalBits, decimalBits>(const TFixedInt<T2, otherTB, otherDB> &fi) {
|
||||
explicit TFixedInt(const TFixedInt<T2, otherTB, otherDB> &fi) {
|
||||
int diff = otherDB - decimalBits;
|
||||
if (otherDB >= decimalBits)
|
||||
val = fi.raw() >> diff;
|
||||
|
@ -37,7 +37,7 @@ protected:
|
||||
Common::Array<T> _data;
|
||||
size_type _topIndex;
|
||||
public:
|
||||
FixedQueue<T, MAX_SIZE>() : _topIndex(0) {
|
||||
FixedQueue() : _topIndex(0) {
|
||||
_data.reserve(MAX_SIZE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user