summaryrefslogtreecommitdiff
path: root/gptpart.cc
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2018-07-05 16:50:13 -0400
committerRod Smith <rodsmith@rodsbooks.com>2018-07-05 16:50:13 -0400
commit9ae60195b9d24c01f535ade5b7bcf0e63c0600be (patch)
tree3f7c35f56cb9222be3081c57b3f7d61af3390483 /gptpart.cc
parent8dab6f22ee54e63d98cf303d16702794d091bcbb (diff)
downloadsgdisk-9ae60195b9d24c01f535ade5b7bcf0e63c0600be.tar.gz
Added explicit copy constructors and made other tweaks to avoid
compiler complaints.
Diffstat (limited to 'gptpart.cc')
-rw-r--r--gptpart.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gptpart.cc b/gptpart.cc
index 40a90a3..666263b 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -38,6 +38,15 @@ GPTPart::GPTPart(void) {
memset(name, 0, NAME_SIZE * sizeof(name[0]) );
} // Default constructor
+GPTPart::GPTPart(const GPTPart & orig) {
+ partitionType = orig.partitionType;
+ uniqueGUID = orig.uniqueGUID;
+ firstLBA = orig.firstLBA;
+ lastLBA = orig.lastLBA;
+ attributes = orig.attributes;
+ memcpy(name, orig.name, NAME_SIZE * sizeof( name[ 0 ] ) );
+} // Copy constructor
+
GPTPart::~GPTPart(void) {
} // destructor