From 94b1490b7b906b90e743512edd305302ed96ce0f Mon Sep 17 00:00:00 2001 From: Gilles Moris Date: Wed, 15 May 2019 07:07:21 +0200 Subject: Create a constant unusedPartType object instead of recreating it each time --- gptpart.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gptpart.cc') 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) { -- cgit v1.2.1