From d1dee3c9092b7c270b297366757c9fc8d03bb0dd Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 2 Aug 2016 13:12:34 +0200 Subject: Fixed RasPi builds of unit tests. On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds. --- src/ByteBuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ByteBuffer.cpp') diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index 77e3f61fd..b5f862a73 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -135,7 +135,9 @@ bool cByteBuffer::Write(const void * a_Bytes, size_t a_Count) // Store the current free space for a check after writing: size_t CurFreeSpace = GetFreeSpace(); - size_t CurReadableSpace = GetReadableSpace(); + #ifdef _DEBUG + size_t CurReadableSpace = GetReadableSpace(); + #endif size_t WrittenBytes = 0; if (CurFreeSpace < a_Count) -- cgit v1.2.3