[Scummvm-git-logs] scummvm master -> 86a9fd66c58f35a7b4de93d9dd46112dced35a32
bluegr
noreply at scummvm.org
Sat May 25 21:00:48 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
86a9fd66c5 JANITORIAL: Fix GCC 14 warnings
Commit: 86a9fd66c58f35a7b4de93d9dd46112dced35a32
https://github.com/scummvm/scummvm/commit/86a9fd66c58f35a7b4de93d9dd46112dced35a32
Author: Peter (peter277 at users.noreply.github.com)
Date: 2024-05-26T00:00:45+03:00
Commit Message:
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.
Changed paths:
common/singleton.h
common/stack.h
engines/adl/graphics.h
engines/startrek/fixedint.h
engines/titanic/support/fixed_queue.h
diff --git a/common/singleton.h b/common/singleton.h
index b462d3adc1b..1b8cb5e46d6 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -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;
diff --git a/common/stack.h b/common/stack.h
index 554f323623a..3a1412d523b 100644
--- a/common/stack.h
+++ b/common/stack.h
@@ -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();
diff --git a/engines/adl/graphics.h b/engines/adl/graphics.h
index 297e2fb3ce1..0a7b560197c 100644
--- a/engines/adl/graphics.h
+++ b/engines/adl/graphics.h
@@ -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;
diff --git a/engines/startrek/fixedint.h b/engines/startrek/fixedint.h
index 585c3182219..2b712a30441 100644
--- a/engines/startrek/fixedint.h
+++ b/engines/startrek/fixedint.h
@@ -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;
diff --git a/engines/titanic/support/fixed_queue.h b/engines/titanic/support/fixed_queue.h
index 3764a68a9c0..16679db36b2 100644
--- a/engines/titanic/support/fixed_queue.h
+++ b/engines/titanic/support/fixed_queue.h
@@ -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);
}
More information about the Scummvm-git-logs
mailing list