summaryrefslogtreecommitdiffstats
path: root/src/ByteBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ByteBuffer.cpp')
-rw-r--r--src/ByteBuffer.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp
index 46f2ba0d4..8121fc3ef 100644
--- a/src/ByteBuffer.cpp
+++ b/src/ByteBuffer.cpp
@@ -214,6 +214,24 @@ size_t cByteBuffer::GetReadableSpace(void) const
+bool cByteBuffer::CanBEInt8Represent(int a_Value)
+{
+ return (-128 <= a_Value) && (a_Value <= 127);
+}
+
+
+
+
+
+bool cByteBuffer::CanBEInt16Represent(int a_Value)
+{
+ return (-32768 <= a_Value) && (a_Value <= 32767);
+}
+
+
+
+
+
bool cByteBuffer::CanReadBytes(size_t a_Count) const
{
CHECK_THREAD