diff --git a/_byte_buffer_8cpp.html b/_byte_buffer_8cpp.html
index f558f1b0..97724a96 100644
--- a/_byte_buffer_8cpp.html
+++ b/_byte_buffer_8cpp.html
@@ -93,6 +93,7 @@ $(function(){ initResizable(false); });
diff --git a/_byte_buffer_8cpp_source.html b/_byte_buffer_8cpp_source.html
index af7144a6..67da3f9e 100644
--- a/_byte_buffer_8cpp_source.html
+++ b/_byte_buffer_8cpp_source.html
@@ -93,106 +93,119 @@ $(function(){ initResizable(false); });
Go to the documentation of this file.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
21 ::memcpy(this->
content, v_content, v_size);
-
+
+
+
+
+
+
+
+
+
+
+
+
+
25 ::memcpy(this->
content, v_content, v_size);
+
+
-
-
-
-
-
-
-
28 if (v_parent == NULL)
throw BufferException(
"Cannot make subBuffer for NULL buffer!");
-
-
-
-
-
33 bufsize_t copySize = v_size < parentSize ? v_size : parentSize;
-
34 bufsize_t allocSize = v_size > parentSize ? v_size : parentSize;
+
+
+
+
+
+
+
33 if (!v_parent)
throw BufferException(
"Cannot make subBuffer for NULL buffer!");
+
-
36 BYTE *bContent = v_parent->
getContentAt(v_offset, copySize);
-
37 if (bContent == NULL)
throw BufferException(
"Cannot make Buffer for NULL content!");
-
-
-
-
-
42 ::memcpy(this->
content, bContent, copySize);
-
+
+
+
38 bufsize_t copySize = v_size < parentSize ? v_size : parentSize;
+
39 bufsize_t allocSize = v_size > parentSize ? v_size : parentSize;
+
+
41 BYTE *bContent = v_parent->
getContentAt(v_offset, copySize);
+
42 if (!bContent)
throw BufferException(
"Cannot make Buffer for NULL content!");
+
+
+
+
+
+
48 ::memcpy(this->
content, bContent, copySize);
+
+
-
-
-
-
-
-
-
49 BYTE*
content =
new (std::nothrow) BYTE[allocSize];
-
-
51 throw BufferException(
"Cannot allocate buffer of size: 0x" + QString::number(allocSize, 16));
-
-
53 ::memset(
content, 0, allocSize);
-
-
+
+
+
+
+
+
+
56 const bufsize_t allocSize = v_size + v_padding;
+
57 std::cerr <<
"Trying to resize. Ptr: " << std::hex << (
void*)
content <<
" New size: " << allocSize << std::endl;
+
+
+
60 BYTE*
content =
reinterpret_cast<BYTE*
>(::realloc((
void*)this->content, allocSize));
+
+
+
63 std::cerr <<
"Error!" << std::endl;
+
64 throw BufferException(
"Cannot allocate buffer of size: 0x" + QString::number(allocSize, 16));
+
+
+
67 std::cerr <<
"Ptr: " << std::hex << (
void*)
content <<
" Additional size: " << sizeDiff <<
" BaseContentSize: " << this->
contentSize << std::endl;
+
+
+
70 std::cerr <<
"Ptr: " << std::hex << (
void*)
content <<
" New size: " << allocSize << std::endl;
+
+
+
+
+
+
+
-
-
-
-
-
-
-
61 BYTE *newContent = NULL;
-
-
-
-
-
-
67 if (!newContent)
return false;
-
-
69 BYTE *oldContent = this->
content;
-
-
71 bufsize_t copySize = newSize < oldSize ? newSize : oldSize;
-
-
73 ::memcpy(newContent, oldContent, copySize);
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
84 BYTE *newContent =
nullptr;
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
100 std::cerr <<
"Ptr: " << std::hex << (
void*)
content <<
" BaseContentSize: " << this->
contentSize <<
" : " << __FUNCTION__ << std::endl;
+
+
-
-
-
@@ -202,12 +215,12 @@ $(function(){ initResizable(false); });
-
+
-
ByteBuffer(bufsize_t v_size, bufsize_t padding=DEFAULT_PADDING)
-
BYTE * allocContent(bufsize_t v_size, bufsize_t padding)
+
ByteBuffer(bufsize_t v_size, bufsize_t padding=DEFAULT_PADDING)
+
BYTE * allocContent(bufsize_t v_size, bufsize_t padding)
-
virtual bool resize(bufsize_t newSize)
+
virtual bool resize(bufsize_t newSize)
-
Definition at line 3 of file ByteBuffer.cpp.
+
Definition at line 4 of file ByteBuffer.cpp.
@@ -255,7 +255,7 @@ Here is the call graph for this function:
@@ -376,7 +376,7 @@ Here is the call graph for this function: