SpoutDev/Spout — pull request #1950 by bergerkiller (2012-07-27 14:23:04+00:00)
Title: Performance improvements for the Block constructor

Signed-off-by: Irmo van den Berge

More than often translating the Block results in a Block in the same chunk as the previous. This PR checks if the new block still resides in the chunk given (also a sort of safety feature) and also passes the current chunk into the block constructor when translating.

I changed the 'get chunk' call in the chunk-free constructor to null to make sure that, when you don't need a chunk, no chunk is obtained. For example, you translate a block two times and discard the previous block.