]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/SamHeader.cpp
Added explicit copy ctors to SamHeader data structures
[bamtools.git] / src / api / SamHeader.cpp
index 405033fa740dff49dea0b14d92c2e150c6c61cbc..74381f0967df4e4181a0919835b512cd0f09d723 100644 (file)
@@ -16,6 +16,7 @@ using namespace BamTools;
 using namespace BamTools::Internal;
 using namespace std;
 
+// ctor
 SamHeader::SamHeader(const string& headerText)
     : Version("")
     , SortOrder("")
@@ -28,6 +29,19 @@ SamHeader::SamHeader(const string& headerText)
     parser.Parse(headerText);
 }
 
+// copy ctor
+SamHeader::SamHeader(const SamHeader& other)
+    : Version(other.Version)
+    , SortOrder(other.SortOrder)
+    , GroupOrder(other.GroupOrder)
+    , Sequences(other.Sequences)
+    , ReadGroups(other.ReadGroups)
+    , ProgramName(other.ProgramName)
+    , ProgramVersion(other.ProgramVersion)
+    , ProgramCommandLine(other.ProgramCommandLine)
+{ }
+
+// dtor
 SamHeader::~SamHeader(void) {
     Clear();
 }