]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/BamAux.h
Fixed: bug(s) related to empty references and regions.
[bamtools.git] / src / api / BamAux.h
index 3eff2d7e723b3cb25cf72a1c8483207f11975447..9d38e7d824c552fba693e9b5b11869be1829bfe0 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College\r
 // All rights reserved.\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 18 September 2010 (DB)\r
+// Last modified: 9 October 2010 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Provides the basic constants, data structures, utilities etc. \r
 // used throughout the API for handling BAM files\r
@@ -111,6 +111,14 @@ struct BamRegion {
         , RightPosition(rightPos)\r
     { }\r
     \r
+    // copy constructor\r
+    BamRegion(const BamRegion& other)\r
+       : LeftRefID(other.LeftRefID)\r
+       , LeftPosition(other.LeftPosition)\r
+       , RightRefID(other.RightRefID)\r
+       , RightPosition(other.RightPosition)\r
+    { }\r
+    \r
     // member functions\r
     void clear(void) { LeftRefID = -1; LeftPosition = -1; RightRefID = -1; RightPosition = -1; }\r
     bool isLeftBoundSpecified(void) const { return ( LeftRefID != -1 && LeftPosition != -1 ); }\r