[Scummvm-git-logs] scummvm master -> 0c6a2e0aded147cde865471c9e1081424ad0d4e3

mgerhardy noreply at scummvm.org
Tue Oct 15 06:58:30 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:
0c6a2e0ade TWINE: moved member initialization into the ctor of the ringbuffer


Commit: 0c6a2e0aded147cde865471c9e1081424ad0d4e3
    https://github.com/scummvm/scummvm/commit/0c6a2e0aded147cde865471c9e1081424ad0d4e3
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-10-15T08:57:40+02:00

Commit Message:
TWINE: moved member initialization into the ctor of the ringbuffer

... to potentially work around a compiler bug on riscos (gcc)

Changed paths:
    engines/twine/debugger/ringbuffer.h


diff --git a/engines/twine/debugger/ringbuffer.h b/engines/twine/debugger/ringbuffer.h
index 0b1aef4b83e..3c280a1761d 100644
--- a/engines/twine/debugger/ringbuffer.h
+++ b/engines/twine/debugger/ringbuffer.h
@@ -16,14 +16,17 @@ namespace TwinE {
 template<typename TYPE, size_t SIZE = 64u>
 class RingBuffer {
 protected:
-	size_t _size = 0u;
-	size_t _front = 0u;
-	size_t _back = SIZE - 1;
-	TYPE _buffer[SIZE]{};
+	size_t _size;
+	size_t _front;
+	size_t _back;
+	TYPE _buffer[SIZE];
 
 public:
 	using value_type = TYPE;
 
+	RingBuffer() : _size(0u), _front(0u), _back(0) {
+	}
+
 	class iterator {
 	private:
 		RingBuffer *_ringBuffer;




More information about the Scummvm-git-logs mailing list