From 1e46717b57099e83140ca24652a33208f5475999 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 19 Jun 2020 03:32:23 -0400 Subject: [PATCH] CPropertyNameGenerator: Make use of in-class initializers Same behavior, less code. --- .../Resource/Script/Property/CPropertyNameGenerator.cpp | 8 +------- .../Resource/Script/Property/CPropertyNameGenerator.h | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp b/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp index 491f5155..0f01df0d 100644 --- a/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp +++ b/src/Core/Resource/Script/Property/CPropertyNameGenerator.cpp @@ -5,13 +5,7 @@ #include /** Default constructor */ -CPropertyNameGenerator::CPropertyNameGenerator() - : mWordListLoadStarted(false) - , mWordListLoadFinished(false) - , mIsRunning(false) - , mFinishedRunning(false) -{ -} +CPropertyNameGenerator::CPropertyNameGenerator() = default; void CPropertyNameGenerator::Warmup() { diff --git a/src/Core/Resource/Script/Property/CPropertyNameGenerator.h b/src/Core/Resource/Script/Property/CPropertyNameGenerator.h index d9ef6979..70104947 100644 --- a/src/Core/Resource/Script/Property/CPropertyNameGenerator.h +++ b/src/Core/Resource/Script/Property/CPropertyNameGenerator.h @@ -63,16 +63,16 @@ struct SGeneratedPropertyName class CPropertyNameGenerator { /** Whether we have started loading the word list */ - bool mWordListLoadStarted; + bool mWordListLoadStarted = false; /** Whether the word list has been fully loaded */ - bool mWordListLoadFinished; + bool mWordListLoadFinished = false; /** Whether the generation process is running */ - bool mIsRunning; + bool mIsRunning = false; /** Whether the generation process finished running */ - bool mFinishedRunning; + bool mFinishedRunning = false; /** List of valid property types to check against */ std::vector mTypeNames;