]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/internal/io/ByteArray_p.cpp
Updated file headers (filename, license, description, etc)
[bamtools.git] / src / api / internal / io / ByteArray_p.cpp
index aa74f288a7317fe7f75ef44c8a2089ddf6d6f9d8..5f54c83994bee1aa13c1fcd06f14e0abfb2af48d 100644 (file)
@@ -1,3 +1,12 @@
+// ***************************************************************************
+// ByteArray_p.cpp (c) 2011 Derek Barnett
+// Marth Lab, Department of Biology, Boston College
+// ---------------------------------------------------------------------------
+// Last modified: 10 November 2011 (DB)
+// ---------------------------------------------------------------------------
+// Provides a dynamic, variable-length byte buffer
+// ***************************************************************************
+
 #include "api/internal/io/ByteArray_p.h"
 using namespace BamTools;
 using namespace BamTools::Internal;
@@ -59,9 +68,9 @@ char& ByteArray::operator[](size_t i) {
 }
 
 size_t ByteArray::IndexOf(const char c, const size_t from, const size_t to) const {
-    const size_t size = ( (to == 0 ) ? m_data.size() : to);
+    const size_t size = ( (to == 0 ) ? m_data.size() : to );
     for ( size_t i = from; i < size; ++i ) {
-        if ( m_data.at(i) == c )
+        if ( m_data.at(i) == c ) 
             return i;
     }
     return m_data.size();