summaryrefslogtreecommitdiff
path: root/utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp')
-rw-r--r--[-rwxr-xr-x]utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp b/utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp
index ae2584e..579b152 100755..100644
--- a/utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp
+++ b/utils/zenutils/libraries/pelib-0.9/pelib/buffer/InputBuffer.cpp
@@ -1,58 +1,58 @@
-/*
-* InputBuffer.cpp - Part of the PeLib library.
-*
-* Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com)
-* All rights reserved.
-*
-* This software is licensed under the zlib/libpng License.
-* For more details see http://www.opensource.org/licenses/zlib-license.php
-* or the license information file (license.htm) in the root directory
-* of PeLib.
-*/
-
-#include "InputBuffer.h"
-
-namespace PeLib
-{
- unsigned long InputBuffer::get()
- {
- return ulIndex;
- }
-
- InputBuffer::InputBuffer(std::vector<unsigned char>& vBuffer) : m_vBuffer(vBuffer), ulIndex(0)
- {
- }
-
- const unsigned char* InputBuffer::data() const
- {
- return &m_vBuffer[0];
- }
-
- unsigned long InputBuffer::size()
- {
- return static_cast<unsigned long>(m_vBuffer.size());
- }
-
- void InputBuffer::read(char* lpBuffer, unsigned long ulSize)
- {
- std::copy(&m_vBuffer[ulIndex], &m_vBuffer[ulIndex + ulSize], lpBuffer);
- ulIndex += ulSize;
- }
-
- void InputBuffer::reset()
- {
- m_vBuffer.clear();
- }
-
- void InputBuffer::set(unsigned long ulIndex)
- {
- this->ulIndex = ulIndex;
- }
-
- void InputBuffer::setBuffer(std::vector<unsigned char>& vBuffer)
- {
- m_vBuffer = vBuffer;
- ulIndex = 0;
- }
-}
-
+/*
+* InputBuffer.cpp - Part of the PeLib library.
+*
+* Copyright (c) 2004 - 2005 Sebastian Porst (webmaster@the-interweb.com)
+* All rights reserved.
+*
+* This software is licensed under the zlib/libpng License.
+* For more details see http://www.opensource.org/licenses/zlib-license.php
+* or the license information file (license.htm) in the root directory
+* of PeLib.
+*/
+
+#include "InputBuffer.h"
+
+namespace PeLib
+{
+ unsigned long InputBuffer::get()
+ {
+ return ulIndex;
+ }
+
+ InputBuffer::InputBuffer(std::vector<unsigned char>& vBuffer) : m_vBuffer(vBuffer), ulIndex(0)
+ {
+ }
+
+ const unsigned char* InputBuffer::data() const
+ {
+ return &m_vBuffer[0];
+ }
+
+ unsigned long InputBuffer::size()
+ {
+ return static_cast<unsigned long>(m_vBuffer.size());
+ }
+
+ void InputBuffer::read(char* lpBuffer, unsigned long ulSize)
+ {
+ std::copy(&m_vBuffer[ulIndex], &m_vBuffer[ulIndex + ulSize], lpBuffer);
+ ulIndex += ulSize;
+ }
+
+ void InputBuffer::reset()
+ {
+ m_vBuffer.clear();
+ }
+
+ void InputBuffer::set(unsigned long ulIndex)
+ {
+ this->ulIndex = ulIndex;
+ }
+
+ void InputBuffer::setBuffer(std::vector<unsigned char>& vBuffer)
+ {
+ m_vBuffer = vBuffer;
+ ulIndex = 0;
+ }
+}
+