You can clone with
HTTPS or Subversion.
SFML Class that uses input stream assume following things that are not clearly mentioned in documentation:
1. Instance passed to them has its' get pointer at 0 as if seek(0) was called or like standard streams in c++ and C do when they're freshly created.
2. When something is read() from the instance passed to it, the get pointer is advanced the same number of bytes as the returned number.
1. Call seek(0) or use tell() to check if stream is at the beggining and call seek(0) if it's not.
2. That's quite understandable assumption and the way standard streams work so it should be enough to just document it.
Point 1: I don't think seeking would be the best option, because I'd consider this expected and intended behavior (so I'd probably add a note to the documentation, but no code change)
Point 2: What's wrong here or what can be misunderstood?
loadFromStream functions now explicitly reset the stream (seek(0)) be…
…fore starting to read (#349)
InputStream.hpp was missing from the source file listing in CMake fil…
…es, and added an important comment in the doc of InputStream::read (#349)