D G Turner
78ef4b9499
COMMON: Add Default Cases to Switch Statements in Memstream Classes
...
These are flagged by GCC if -Wswitch-default is enabled.
This avoids possible hard to diagnose bugs if the whence int parameter is
accidently set to an unexpected value.
2019-10-02 06:12:38 +01:00
Paul Gilbert
e2f68e2403
COMMON: Fix seek return values, memory stream use in create_titanic
2019-05-12 11:44:15 +03:00
Paul Gilbert
f4dacdf34d
COMMON: Created SeekableWriteStream class
2019-05-12 11:44:15 +03:00
Bastien Bouclet
955e18c648
COMMON: Use nullptr instead of NULL or 0 where appropriate
2018-05-10 08:35:46 +02:00
Adrian Frühwirth
3747d852ee
JANITORIAL: Fix whitespace
2018-04-15 16:31:31 +02:00
Bastien Bouclet
be67f0d8bf
COMMON: Remove DisposeAfterUse default value from dynamic write memory streams
...
The default value was DisposeAfterUse::NO, which made it very easy to
accidentally leak memory by omitting to specify a value.
2017-09-22 07:06:21 +02:00
Colin Snover
1d844978d6
COMMON: Implement SeekableReadStream interface for MemoryReadWriteStream
...
This allows MemoryReadWriteStream to be passed successfully to
functions that use the SeekableReadStream type so that they can
call the `pos` method, like the DPCMStream class of the VMD
decoder.
2017-08-20 11:36:14 -05:00
Alexander Tkachev
368f664c81
COMMON: Fix WriteStream::pos() once again
...
MemoryReadWriteStream now returns int32, not uint32. It actually doesn't
ever return -1 to indicate that an error occured, so uint32 was a better
choice, but that's what is used in WriteStream base class now.
That method is abstract, so that's also why OutSaveFile had to override
it.
2016-08-24 16:24:16 +06:00
Alexander Tkachev
438ba985a4
JANITORIAL: Remove spaces at the end of the line
...
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d014b5bf38
CLOUD: Fix MemoryReadWriteStream
...
There was a problem with file downloading in MinGW. Strangely, there is
no such problem in Visual Studio, yet this fixes the problem.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9c22b7cc64
CLOUD: Rewrite NetworkReadStream
...
Now it is based on MemoryReadWriteStream, which is introduced by this
commit. This stream is using ring buffer and is dynamically increasing
its size when necessary.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7a89caac84
COMMON: Add WriteStream::pos()
...
It returns int32, because some complex streams are derived from both
WriteStream and ReadStream, and in ReadStream pos() returns int32,
because -1 means an error.
I had to change MemoryStream's uint32 to int32, which is probably not so
good.
2016-08-04 14:36:21 +06:00
Willem Jan Palenstijn
e243147f1e
COMMON: Make MemoryWriteStreamDynamic private members protected
2016-07-02 21:19:23 +02:00
Eugene Sandulenko
f1fa8ea1ca
COMMON: Use better reallocation strategy in MemoryWriteStreamDynamic.
...
Fixes bug #6983 : "SWORD25: long saving time"
2016-03-28 18:45:34 +02:00
Johannes Schickel
854e22b38b
COMMON: Make GPL headers consistent in themselves.
2014-02-18 02:39:33 +01:00
Eugene Sandulenko
f59512c47e
RECORDER: Implement Events Recorder
2013-05-17 00:18:09 +03:00
Johannes Schickel
b4d0a8ba66
JANITORIAL: Enforce "} // End of namespace" with a single space after }.
2013-01-26 19:38:02 +01:00
Johannes Schickel
efe2fe7e1f
COMMON: Properly handle error indicator in MemoryWriteStream.
...
Thanks to waltervn for noticing that MemoryWriteStream::write doesn't handle
setting the error indicator properly.
2012-10-09 23:06:25 +02:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2
JANITORIAL: Reduce header dependencies in shared code
...
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
12d5151ff4
COMMON: Remove default value for endianess in ReadStreamEndian subclasses
...
svn-id: r54441
2010-11-23 22:27:20 +00:00
Max Horn
382982d6e3
COMMON: Add ReadStreamEndian mixin class
...
svn-id: r54438
2010-11-23 22:26:27 +00:00
Max Horn
ae919f3ebd
COMMON: Remove XOR decoding capability from MemoryReadStream
...
svn-id: r54436
2010-11-23 22:25:53 +00:00
Max Horn
2180b2d6b5
COMMON: Split common/stream.h into several headers
...
svn-id: r54385
2010-11-19 17:03:07 +00:00