summaryrefslogtreecommitdiff
path: root/gptpart.cc
diff options
context:
space:
mode:
authorGilles Moris <gilles.moris@free.fr>2019-05-15 07:07:21 +0200
committerGilles Moris <gilles.moris@free.fr>2019-05-15 07:07:21 +0200
commit94b1490b7b906b90e743512edd305302ed96ce0f (patch)
tree94f544b4d84702270a7b7dad7f2622a954479da9 /gptpart.cc
parentfaaaa2618f965d12fc47837aa026bd123f680098 (diff)
downloadsgdisk-94b1490b7b906b90e743512edd305302ed96ce0f.tar.gz
Create a constant unusedPartType object instead of recreating it each time
Diffstat (limited to 'gptpart.cc')
-rw-r--r--gptpart.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gptpart.cc b/gptpart.cc
index 56415e1..b4f2698 100644
--- a/gptpart.cc
+++ b/gptpart.cc
@@ -434,7 +434,7 @@ void GPTPart::ReversePartBytes(void) {
void GPTPart::ChangeType(void) {
string line;
int changeName;
- PartType tempType = (GUIDData) "00000000-0000-0000-0000-000000000000";
+ PartType tempType = PartType::unusedPartType;
#ifdef USE_UTF16
changeName = (GetDescription() == GetUTypeName());
@@ -454,7 +454,7 @@ void GPTPart::ChangeType(void) {
else
tempType = line;
} // if/else
- } while (tempType == (GUIDData) "00000000-0000-0000-0000-000000000000");
+ } while (tempType == PartType::unusedPartType);
partitionType = tempType;
cout << "Changed type of partition to '" << partitionType.TypeName() << "'\n";
if (changeName) {