Correctly rollback the previous rollback

This commit is contained in:
Alexander Bock
2016-07-07 13:49:57 +02:00
parent 6e9d299dda
commit e3a1b775fd
2 changed files with 16 additions and 6 deletions

View File

@@ -28,6 +28,7 @@
#include <ghoul/opengl/ghoul_gl.h>
#include <ghoul/misc/assert.h>
#include <memory>
#include <stdint.h>
#include <vector>
@@ -43,6 +44,8 @@ public:
SyncBuffer(size_t n);
~SyncBuffer();
void encode(const std::string& s) {
const size_t size = sizeof(char) * s.size() + sizeof(int32_t);
ghoul_assert(_encodeOffset + size < _n, "");
@@ -107,7 +110,7 @@ private:
size_t _encodeOffset;
size_t _decodeOffset;
std::vector<char> _dataStream;
sgct::SharedVector<char> _synchronizationBuffer;
std::unique_ptr<sgct::SharedVector<char>> _synchronizationBuffer;
};
} // namespace openspace