mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 07:39:47 -05:00
Merge topic 'member-init'
b2aa3aedeaclang-tidy: Use default member initialization32cb564beaclang-tidy: Remove redundant member initializations7ffa6bf999cmUVHandlePtr: Use inherited constructors Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2726
This commit is contained in:
+3
-2
@@ -15,7 +15,6 @@ modernize-*,\
|
||||
-modernize-raw-string-literal,\
|
||||
-modernize-return-braced-init-list,\
|
||||
-modernize-use-auto,\
|
||||
-modernize-use-default-member-init,\
|
||||
-modernize-use-emplace,\
|
||||
-modernize-use-equals-default,\
|
||||
-modernize-use-equals-delete,\
|
||||
@@ -33,8 +32,10 @@ readability-*,\
|
||||
-readability-inconsistent-declaration-parameter-name,\
|
||||
-readability-named-parameter,\
|
||||
-readability-redundant-declaration,\
|
||||
-readability-redundant-member-init,\
|
||||
-readability-simplify-boolean-expr,\
|
||||
"
|
||||
HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
|
||||
CheckOptions:
|
||||
- key: modernize-use-default-member-init.UseAssignment
|
||||
value: '1'
|
||||
...
|
||||
|
||||
@@ -503,10 +503,7 @@ public:
|
||||
: FTC(ftc)
|
||||
{
|
||||
}
|
||||
FragmentCompare()
|
||||
: FTC(nullptr)
|
||||
{
|
||||
}
|
||||
FragmentCompare() {}
|
||||
bool operator()(std::string const& l, std::string const& r) const
|
||||
{
|
||||
// Order files by modification time. Use lexicographic order
|
||||
@@ -520,7 +517,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
cmFileTimeComparison* FTC;
|
||||
cmFileTimeComparison* FTC = nullptr;
|
||||
};
|
||||
|
||||
void cmCTestBuildHandler::GenerateXMLLaunched(cmXMLWriter& xml)
|
||||
|
||||
@@ -475,15 +475,9 @@ private:
|
||||
{
|
||||
std::string Name;
|
||||
std::string EMail;
|
||||
unsigned long Time;
|
||||
long TimeZone;
|
||||
Person()
|
||||
: Name()
|
||||
, EMail()
|
||||
, Time(0)
|
||||
, TimeZone(0)
|
||||
{
|
||||
}
|
||||
unsigned long Time = 0;
|
||||
long TimeZone = 0;
|
||||
Person() {}
|
||||
};
|
||||
|
||||
void ParsePerson(const char* str, Person& person)
|
||||
|
||||
@@ -119,7 +119,6 @@ static size_t cmCTestSubmitHandlerCurlDebugCallback(CURL* /*unused*/,
|
||||
}
|
||||
|
||||
cmCTestSubmitHandler::cmCTestSubmitHandler()
|
||||
: HTTPProxy()
|
||||
{
|
||||
this->Initialize();
|
||||
}
|
||||
|
||||
@@ -475,11 +475,8 @@ int CCONV cmGetTotalArgumentSize(int argc, char** argv)
|
||||
// API for source files.
|
||||
struct cmCPluginAPISourceFile
|
||||
{
|
||||
cmCPluginAPISourceFile()
|
||||
: RealSourceFile(nullptr)
|
||||
{
|
||||
}
|
||||
cmSourceFile* RealSourceFile;
|
||||
cmCPluginAPISourceFile() {}
|
||||
cmSourceFile* RealSourceFile = nullptr;
|
||||
std::string SourceName;
|
||||
std::string SourceExtension;
|
||||
std::string FullPath;
|
||||
|
||||
+2
-5
@@ -57,10 +57,7 @@ public:
|
||||
/** Representation of one part. */
|
||||
struct PartInfo
|
||||
{
|
||||
PartInfo()
|
||||
: Enabled(false)
|
||||
{
|
||||
}
|
||||
PartInfo() {}
|
||||
|
||||
void SetName(const std::string& name) { this->Name = name; }
|
||||
const std::string& GetName() const { return this->Name; }
|
||||
@@ -71,7 +68,7 @@ public:
|
||||
std::vector<std::string> SubmitFiles;
|
||||
|
||||
private:
|
||||
bool Enabled;
|
||||
bool Enabled = false;
|
||||
std::string Name;
|
||||
};
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
|
||||
@@ -34,20 +34,15 @@ private:
|
||||
struct CacheEntry
|
||||
{
|
||||
std::string Value;
|
||||
cmStateEnums::CacheEntryType Type;
|
||||
cmStateEnums::CacheEntryType Type = cmStateEnums::UNINITIALIZED;
|
||||
cmPropertyMap Properties;
|
||||
std::vector<std::string> GetPropertyList() const;
|
||||
const char* GetProperty(const std::string&) const;
|
||||
void SetProperty(const std::string& property, const char* value);
|
||||
void AppendProperty(const std::string& property, const char* value,
|
||||
bool asString = false);
|
||||
bool Initialized;
|
||||
CacheEntry()
|
||||
: Value("")
|
||||
, Type(cmStateEnums::UNINITIALIZED)
|
||||
, Initialized(false)
|
||||
{
|
||||
}
|
||||
bool Initialized = false;
|
||||
CacheEntry() {}
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
+2
-5
@@ -30,10 +30,7 @@ public:
|
||||
/**
|
||||
* Construct the command. By default it has no makefile.
|
||||
*/
|
||||
cmCommand()
|
||||
: Makefile(nullptr)
|
||||
{
|
||||
}
|
||||
cmCommand() {}
|
||||
|
||||
/**
|
||||
* Need virtual destructor to destroy real command type.
|
||||
@@ -90,7 +87,7 @@ public:
|
||||
void SetError(const std::string& e);
|
||||
|
||||
protected:
|
||||
cmMakefile* Makefile;
|
||||
cmMakefile* Makefile = nullptr;
|
||||
|
||||
private:
|
||||
std::string Error;
|
||||
|
||||
@@ -35,16 +35,10 @@ public:
|
||||
struct LinkEntry
|
||||
{
|
||||
std::string Item;
|
||||
cmGeneratorTarget const* Target;
|
||||
bool IsSharedDep;
|
||||
bool IsFlag;
|
||||
LinkEntry()
|
||||
: Item()
|
||||
, Target(nullptr)
|
||||
, IsSharedDep(false)
|
||||
, IsFlag(false)
|
||||
{
|
||||
}
|
||||
cmGeneratorTarget const* Target = nullptr;
|
||||
bool IsSharedDep = false;
|
||||
bool IsFlag = false;
|
||||
LinkEntry() {}
|
||||
LinkEntry(LinkEntry const& r)
|
||||
: Item(r.Item)
|
||||
, Target(r.Target)
|
||||
|
||||
@@ -30,12 +30,7 @@ public:
|
||||
|
||||
struct Item
|
||||
{
|
||||
Item()
|
||||
: Value()
|
||||
, IsPath(true)
|
||||
, Target(nullptr)
|
||||
{
|
||||
}
|
||||
Item() {}
|
||||
Item(std::string const& v, bool p,
|
||||
cmGeneratorTarget const* target = nullptr)
|
||||
: Value(v)
|
||||
@@ -44,8 +39,8 @@ public:
|
||||
{
|
||||
}
|
||||
std::string Value;
|
||||
bool IsPath;
|
||||
cmGeneratorTarget const* Target;
|
||||
bool IsPath = true;
|
||||
cmGeneratorTarget const* Target = nullptr;
|
||||
};
|
||||
typedef std::vector<Item> ItemVector;
|
||||
ItemVector const& GetItems() const;
|
||||
|
||||
@@ -15,13 +15,9 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
|
||||
, Byproducts(byproducts)
|
||||
, Depends(depends)
|
||||
, CommandLines(commandLines)
|
||||
, Backtrace()
|
||||
, Comment(comment ? comment : "")
|
||||
, WorkingDirectory(workingDirectory ? workingDirectory : "")
|
||||
, HaveComment(comment != nullptr)
|
||||
, EscapeAllowMakeVars(false)
|
||||
, EscapeOldStyle(true)
|
||||
, CommandExpandLists(false)
|
||||
{
|
||||
if (mf) {
|
||||
this->Backtrace = mf->GetBacktrace();
|
||||
|
||||
+3
-10
@@ -47,26 +47,19 @@ private:
|
||||
typedef std::string std_string;
|
||||
|
||||
public:
|
||||
Def()
|
||||
: std_string()
|
||||
, Exists(false)
|
||||
, Used(false)
|
||||
{
|
||||
}
|
||||
Def() {}
|
||||
Def(const char* v)
|
||||
: std_string(v ? v : "")
|
||||
, Exists(v ? true : false)
|
||||
, Used(false)
|
||||
{
|
||||
}
|
||||
Def(const std_string& v)
|
||||
: std_string(v)
|
||||
, Exists(true)
|
||||
, Used(false)
|
||||
{
|
||||
}
|
||||
bool Exists;
|
||||
bool Used;
|
||||
bool Exists = false;
|
||||
bool Used = false;
|
||||
};
|
||||
static Def NoDef;
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
|
||||
cmDepends::cmDepends(cmLocalGenerator* lg, const char* targetDir)
|
||||
: LocalGenerator(lg)
|
||||
, Verbose(false)
|
||||
, FileComparison(nullptr)
|
||||
, TargetDirectory(targetDir)
|
||||
, MaxPath(16384)
|
||||
, Dependee(new char[MaxPath])
|
||||
, Depender(new char[MaxPath])
|
||||
{
|
||||
|
||||
+3
-3
@@ -96,15 +96,15 @@ protected:
|
||||
cmLocalGenerator* LocalGenerator;
|
||||
|
||||
// Flag for verbose output.
|
||||
bool Verbose;
|
||||
cmFileTimeComparison* FileComparison;
|
||||
bool Verbose = false;
|
||||
cmFileTimeComparison* FileComparison = nullptr;
|
||||
|
||||
std::string Language;
|
||||
|
||||
// The full path to the target's build directory.
|
||||
std::string TargetDirectory;
|
||||
|
||||
size_t MaxPath;
|
||||
size_t MaxPath = 16384;
|
||||
char* Dependee;
|
||||
char* Depender;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#define INCLUDE_REGEX_TRANSFORM_MARKER "#IncludeRegexTransform: "
|
||||
|
||||
cmDependsC::cmDependsC()
|
||||
: ValidDeps(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+3
-6
@@ -75,16 +75,13 @@ public:
|
||||
|
||||
struct cmIncludeLines
|
||||
{
|
||||
cmIncludeLines()
|
||||
: Used(false)
|
||||
{
|
||||
}
|
||||
cmIncludeLines() {}
|
||||
std::vector<UnscannedEntry> UnscannedEntries;
|
||||
bool Used;
|
||||
bool Used = false;
|
||||
};
|
||||
|
||||
protected:
|
||||
const std::map<std::string, DependencyVector>* ValidDeps;
|
||||
const std::map<std::string, DependencyVector>* ValidDeps = nullptr;
|
||||
std::set<std::string> Encountered;
|
||||
std::queue<UnscannedEntry> Unscanned;
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ public:
|
||||
};
|
||||
|
||||
cmDependsFortran::cmDependsFortran()
|
||||
: Internal(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ protected:
|
||||
std::set<std::string> PPDefinitions;
|
||||
|
||||
// Internal implementation details.
|
||||
cmDependsFortranInternals* Internal;
|
||||
cmDependsFortranInternals* Internal = nullptr;
|
||||
|
||||
private:
|
||||
std::string MaybeConvertToRelativePath(std::string const& base,
|
||||
|
||||
@@ -116,11 +116,8 @@ private:
|
||||
|
||||
struct RequestedHelpItem
|
||||
{
|
||||
RequestedHelpItem()
|
||||
: HelpType(None)
|
||||
{
|
||||
}
|
||||
cmDocumentationEnums::Type HelpType;
|
||||
RequestedHelpItem() {}
|
||||
cmDocumentationEnums::Type HelpType = None;
|
||||
std::string Filename;
|
||||
std::string Argument;
|
||||
};
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <vector>
|
||||
|
||||
cmDocumentationFormatter::cmDocumentationFormatter()
|
||||
: TextWidth(77)
|
||||
, TextIndent("")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
void SetIndent(const char* indent);
|
||||
|
||||
private:
|
||||
int TextWidth;
|
||||
const char* TextIndent;
|
||||
int TextWidth = 77;
|
||||
const char* TextIndent = "";
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
class cmExecutionStatus
|
||||
{
|
||||
public:
|
||||
cmExecutionStatus()
|
||||
: ReturnInvoked(false)
|
||||
, BreakInvoked(false)
|
||||
, ContinueInvoked(false)
|
||||
, NestedError(false)
|
||||
{
|
||||
}
|
||||
cmExecutionStatus() {}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
@@ -40,10 +34,10 @@ public:
|
||||
bool GetNestedError() const { return this->NestedError; }
|
||||
|
||||
private:
|
||||
bool ReturnInvoked;
|
||||
bool BreakInvoked;
|
||||
bool ContinueInvoked;
|
||||
bool NestedError;
|
||||
bool ReturnInvoked = false;
|
||||
bool BreakInvoked = false;
|
||||
bool ContinueInvoked = false;
|
||||
bool NestedError = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "cmExpandedCommandArgument.h"
|
||||
|
||||
cmExpandedCommandArgument::cmExpandedCommandArgument()
|
||||
: Quoted(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string Value;
|
||||
bool Quoted;
|
||||
bool Quoted = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,9 +25,7 @@ class cmExecutionStatus;
|
||||
#endif
|
||||
|
||||
cmExportCommand::cmExportCommand()
|
||||
: cmCommand()
|
||||
, ArgumentGroup()
|
||||
, Targets(&Helper, "TARGETS")
|
||||
: Targets(&Helper, "TARGETS")
|
||||
, Append(&Helper, "APPEND", &ArgumentGroup)
|
||||
, ExportSetName(&Helper, "EXPORT", &ArgumentGroup)
|
||||
, Namespace(&Helper, "NAMESPACE", &ArgumentGroup)
|
||||
|
||||
@@ -33,7 +33,6 @@ http://forums.codeblocks.org/index.php/topic,6789.0.html
|
||||
*/
|
||||
|
||||
cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator()
|
||||
: cmExternalMakefileProjectGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#include <utility>
|
||||
|
||||
cmExtraCodeLiteGenerator::cmExtraCodeLiteGenerator()
|
||||
: cmExternalMakefileProjectGenerator()
|
||||
, ConfigName("NoConfig")
|
||||
, CpuCount(2)
|
||||
: ConfigName("NoConfig")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class cmExtraCodeLiteGenerator : public cmExternalMakefileProjectGenerator
|
||||
protected:
|
||||
std::string ConfigName;
|
||||
std::string WorkspacePath;
|
||||
unsigned int CpuCount;
|
||||
unsigned int CpuCount = 2;
|
||||
|
||||
protected:
|
||||
std::string GetCodeLiteCompilerName(const cmMakefile* mf) const;
|
||||
|
||||
@@ -41,7 +41,6 @@ void AppendDictionary(cmXMLWriter& xml, const char* key, T const& value)
|
||||
}
|
||||
|
||||
cmExtraEclipseCDT4Generator::cmExtraEclipseCDT4Generator()
|
||||
: cmExternalMakefileProjectGenerator()
|
||||
{
|
||||
this->SupportsVirtualFolders = true;
|
||||
this->GenerateLinkedResources = true;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <vector>
|
||||
|
||||
cmExtraKateGenerator::cmExtraKateGenerator()
|
||||
: cmExternalMakefileProjectGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ cmExtraSublimeTextGenerator::GetFactory()
|
||||
}
|
||||
|
||||
cmExtraSublimeTextGenerator::cmExtraSublimeTextGenerator()
|
||||
: cmExternalMakefileProjectGenerator()
|
||||
{
|
||||
this->ExcludeBuildFolder = false;
|
||||
}
|
||||
|
||||
@@ -1095,13 +1095,9 @@ protected:
|
||||
// Properties set by pattern and regex match rules.
|
||||
struct MatchProperties
|
||||
{
|
||||
bool Exclude;
|
||||
mode_t Permissions;
|
||||
MatchProperties()
|
||||
: Exclude(false)
|
||||
, Permissions(0)
|
||||
{
|
||||
}
|
||||
bool Exclude = false;
|
||||
mode_t Permissions = 0;
|
||||
MatchProperties() {}
|
||||
};
|
||||
struct MatchRule
|
||||
{
|
||||
|
||||
+2
-3
@@ -51,14 +51,13 @@ private:
|
||||
cmFileLockResult LockWithTimeout(unsigned long timeoutSec);
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef HANDLE FileId;
|
||||
HANDLE File = INVALID_HANDLE_VALUE;
|
||||
BOOL LockFile(DWORD flags);
|
||||
#else
|
||||
typedef int FileId;
|
||||
int File = -1;
|
||||
int LockFile(int cmd, int type);
|
||||
#endif
|
||||
|
||||
FileId File;
|
||||
std::string Filename;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
cmFileLock::cmFileLock()
|
||||
: File(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <windows.h> // CreateFileW
|
||||
|
||||
cmFileLock::cmFileLock()
|
||||
: File(INVALID_HANDLE_VALUE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -198,13 +198,10 @@ struct cmFindLibraryHelper
|
||||
// Current names under consideration.
|
||||
struct Name
|
||||
{
|
||||
bool TryRaw;
|
||||
bool TryRaw = false;
|
||||
std::string Raw;
|
||||
cmsys::RegularExpression Regex;
|
||||
Name()
|
||||
: TryRaw(false)
|
||||
{
|
||||
}
|
||||
Name() {}
|
||||
};
|
||||
std::vector<Name> Names;
|
||||
|
||||
|
||||
@@ -1675,11 +1675,7 @@ private:
|
||||
class cmFileList
|
||||
{
|
||||
public:
|
||||
cmFileList()
|
||||
: First()
|
||||
, Last(nullptr)
|
||||
{
|
||||
}
|
||||
cmFileList() {}
|
||||
virtual ~cmFileList() {}
|
||||
cmFileList& operator/(cmFileListGeneratorBase const& rhs)
|
||||
{
|
||||
@@ -1703,15 +1699,14 @@ private:
|
||||
virtual bool Visit(std::string const& fullPath) = 0;
|
||||
friend class cmFileListGeneratorBase;
|
||||
std::unique_ptr<cmFileListGeneratorBase> First;
|
||||
cmFileListGeneratorBase* Last;
|
||||
cmFileListGeneratorBase* Last = nullptr;
|
||||
};
|
||||
|
||||
class cmFindPackageFileList : public cmFileList
|
||||
{
|
||||
public:
|
||||
cmFindPackageFileList(cmFindPackageCommand* fpc, bool use_suffixes = true)
|
||||
: cmFileList()
|
||||
, FPC(fpc)
|
||||
: FPC(fpc)
|
||||
, UseSuffixes(use_suffixes)
|
||||
{
|
||||
}
|
||||
@@ -1753,13 +1748,11 @@ class cmFileListGeneratorFixed : public cmFileListGeneratorBase
|
||||
{
|
||||
public:
|
||||
cmFileListGeneratorFixed(std::string const& str)
|
||||
: cmFileListGeneratorBase()
|
||||
, String(str)
|
||||
: String(str)
|
||||
{
|
||||
}
|
||||
cmFileListGeneratorFixed(cmFileListGeneratorFixed const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, String(r.String)
|
||||
: String(r.String)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1782,13 +1775,11 @@ class cmFileListGeneratorEnumerate : public cmFileListGeneratorBase
|
||||
{
|
||||
public:
|
||||
cmFileListGeneratorEnumerate(std::vector<std::string> const& v)
|
||||
: cmFileListGeneratorBase()
|
||||
, Vector(v)
|
||||
: Vector(v)
|
||||
{
|
||||
}
|
||||
cmFileListGeneratorEnumerate(cmFileListGeneratorEnumerate const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, Vector(r.Vector)
|
||||
: Vector(r.Vector)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1817,14 +1808,12 @@ public:
|
||||
cmFileListGeneratorProject(std::vector<std::string> const& names,
|
||||
cmFindPackageCommand::SortOrderType so,
|
||||
cmFindPackageCommand::SortDirectionType sd)
|
||||
: cmFileListGeneratorBase()
|
||||
, Names(names)
|
||||
: Names(names)
|
||||
{
|
||||
this->SetSort(so, sd);
|
||||
}
|
||||
cmFileListGeneratorProject(cmFileListGeneratorProject const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, Names(r.Names)
|
||||
: Names(r.Names)
|
||||
{
|
||||
this->SetSort(r.SortOrder, r.SortDirection);
|
||||
}
|
||||
@@ -1888,14 +1877,12 @@ class cmFileListGeneratorMacProject : public cmFileListGeneratorBase
|
||||
public:
|
||||
cmFileListGeneratorMacProject(std::vector<std::string> const& names,
|
||||
const char* ext)
|
||||
: cmFileListGeneratorBase()
|
||||
, Names(names)
|
||||
: Names(names)
|
||||
, Extension(ext)
|
||||
{
|
||||
}
|
||||
cmFileListGeneratorMacProject(cmFileListGeneratorMacProject const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, Names(r.Names)
|
||||
: Names(r.Names)
|
||||
, Extension(r.Extension)
|
||||
{
|
||||
}
|
||||
@@ -1941,14 +1928,12 @@ class cmFileListGeneratorCaseInsensitive : public cmFileListGeneratorBase
|
||||
{
|
||||
public:
|
||||
cmFileListGeneratorCaseInsensitive(std::string const& str)
|
||||
: cmFileListGeneratorBase()
|
||||
, String(str)
|
||||
: String(str)
|
||||
{
|
||||
}
|
||||
cmFileListGeneratorCaseInsensitive(
|
||||
cmFileListGeneratorCaseInsensitive const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, String(r.String)
|
||||
: String(r.String)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1985,13 +1970,11 @@ class cmFileListGeneratorGlob : public cmFileListGeneratorBase
|
||||
{
|
||||
public:
|
||||
cmFileListGeneratorGlob(std::string const& str)
|
||||
: cmFileListGeneratorBase()
|
||||
, Pattern(str)
|
||||
: Pattern(str)
|
||||
{
|
||||
}
|
||||
cmFileListGeneratorGlob(cmFileListGeneratorGlob const& r)
|
||||
: cmFileListGeneratorBase()
|
||||
, Pattern(r.Pattern)
|
||||
: Pattern(r.Pattern)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#endif
|
||||
|
||||
cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding)
|
||||
: cmGeneratedFileStreamBase()
|
||||
, Stream()
|
||||
{
|
||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||
if (encoding != codecvt::None) {
|
||||
@@ -105,22 +103,10 @@ void cmGeneratedFileStream::SetCompressionExtraExtension(bool ext)
|
||||
}
|
||||
|
||||
cmGeneratedFileStreamBase::cmGeneratedFileStreamBase()
|
||||
: Name()
|
||||
, TempName()
|
||||
, CopyIfDifferent(false)
|
||||
, Okay(false)
|
||||
, Compress(false)
|
||||
, CompressExtraExtension(true)
|
||||
{
|
||||
}
|
||||
|
||||
cmGeneratedFileStreamBase::cmGeneratedFileStreamBase(std::string const& name)
|
||||
: Name()
|
||||
, TempName()
|
||||
, CopyIfDifferent(false)
|
||||
, Okay(false)
|
||||
, Compress(false)
|
||||
, CompressExtraExtension(true)
|
||||
{
|
||||
this->Open(name);
|
||||
}
|
||||
|
||||
@@ -45,16 +45,16 @@ protected:
|
||||
std::string TempName;
|
||||
|
||||
// Whether to do a copy-if-different.
|
||||
bool CopyIfDifferent;
|
||||
bool CopyIfDifferent = false;
|
||||
|
||||
// Whether the real file stream was valid when it was closed.
|
||||
bool Okay;
|
||||
bool Okay = false;
|
||||
|
||||
// Whether the destination file is compressed
|
||||
bool Compress;
|
||||
bool Compress = false;
|
||||
|
||||
// Whether the destination file is compressed
|
||||
bool CompressExtraExtension;
|
||||
bool CompressExtraExtension = true;
|
||||
};
|
||||
|
||||
/** \class cmGeneratedFileStream
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "cmGeneratorExpressionLexer.h"
|
||||
|
||||
cmGeneratorExpressionLexer::cmGeneratorExpressionLexer()
|
||||
: SawBeginExpression(false)
|
||||
, SawGeneratorExpression(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool SawBeginExpression;
|
||||
bool SawGeneratorExpression;
|
||||
bool SawBeginExpression = false;
|
||||
bool SawGeneratorExpression = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+13
-31
@@ -110,11 +110,8 @@ public:
|
||||
std::set<std::string> ExpectedResxHeaders;
|
||||
std::set<std::string> ExpectedXamlHeaders;
|
||||
std::set<std::string> ExpectedXamlSources;
|
||||
bool Initialized;
|
||||
KindedSources()
|
||||
: Initialized(false)
|
||||
{
|
||||
}
|
||||
bool Initialized = false;
|
||||
KindedSources() {}
|
||||
};
|
||||
|
||||
/** Get all sources needed for a configuration with kinds assigned. */
|
||||
@@ -565,13 +562,9 @@ public:
|
||||
};
|
||||
struct SourceFileFlags
|
||||
{
|
||||
SourceFileFlags()
|
||||
: Type(SourceFileTypeNormal)
|
||||
, MacFolder(nullptr)
|
||||
{
|
||||
}
|
||||
SourceFileType Type;
|
||||
const char* MacFolder; // location inside Mac content folders
|
||||
SourceFileFlags() {}
|
||||
SourceFileType Type = SourceFileTypeNormal;
|
||||
const char* MacFolder = nullptr; // location inside Mac content folders
|
||||
};
|
||||
void GetAutoUicOptions(std::vector<std::string>& result,
|
||||
const std::string& config) const;
|
||||
@@ -757,11 +750,8 @@ private:
|
||||
|
||||
struct CompatibleInterfaces : public CompatibleInterfacesBase
|
||||
{
|
||||
CompatibleInterfaces()
|
||||
: Done(false)
|
||||
{
|
||||
}
|
||||
bool Done;
|
||||
CompatibleInterfaces() {}
|
||||
bool Done = false;
|
||||
};
|
||||
mutable std::map<std::string, CompatibleInterfaces> CompatibleInterfacesMap;
|
||||
|
||||
@@ -774,11 +764,8 @@ private:
|
||||
|
||||
struct LinkImplClosure : public std::vector<cmGeneratorTarget const*>
|
||||
{
|
||||
LinkImplClosure()
|
||||
: Done(false)
|
||||
{
|
||||
}
|
||||
bool Done;
|
||||
LinkImplClosure() {}
|
||||
bool Done = false;
|
||||
};
|
||||
mutable std::map<std::string, LinkImplClosure> LinkImplClosureMap;
|
||||
|
||||
@@ -797,15 +784,10 @@ private:
|
||||
// Cache import information from properties for each configuration.
|
||||
struct ImportInfo
|
||||
{
|
||||
ImportInfo()
|
||||
: NoSOName(false)
|
||||
, Managed(Native)
|
||||
, Multiplicity(0)
|
||||
{
|
||||
}
|
||||
bool NoSOName;
|
||||
ManagedType Managed;
|
||||
unsigned int Multiplicity;
|
||||
ImportInfo() {}
|
||||
bool NoSOName = false;
|
||||
ManagedType Managed = Native;
|
||||
unsigned int Multiplicity = 0;
|
||||
std::string Location;
|
||||
std::string SOName;
|
||||
std::string ImportLibrary;
|
||||
|
||||
@@ -70,13 +70,10 @@ private:
|
||||
|
||||
struct CacheEntryValue
|
||||
{
|
||||
bool Initialized;
|
||||
bool Initialized = false;
|
||||
std::vector<std::string> Files;
|
||||
std::vector<std::pair<std::string, cmListFileBacktrace>> Backtraces;
|
||||
CacheEntryValue()
|
||||
: Initialized(false)
|
||||
{
|
||||
}
|
||||
CacheEntryValue() {}
|
||||
};
|
||||
|
||||
typedef std::map<CacheEntryKey, CacheEntryValue> CacheEntryMap;
|
||||
|
||||
@@ -478,11 +478,8 @@ protected:
|
||||
cmCustomCommandLines CommandLines;
|
||||
std::vector<std::string> Depends;
|
||||
std::string WorkingDir;
|
||||
bool UsesTerminal;
|
||||
GlobalTargetInfo()
|
||||
: UsesTerminal(false)
|
||||
{
|
||||
}
|
||||
bool UsesTerminal = false;
|
||||
GlobalTargetInfo() {}
|
||||
};
|
||||
|
||||
void CreateDefaultGlobalTargets(std::vector<GlobalTargetInfo>& targets);
|
||||
@@ -608,13 +605,10 @@ private:
|
||||
// Cache directory content and target files to be built.
|
||||
struct DirectoryContent
|
||||
{
|
||||
long LastDiskTime;
|
||||
long LastDiskTime = -1;
|
||||
std::set<std::string> All;
|
||||
std::set<std::string> Generated;
|
||||
DirectoryContent()
|
||||
: LastDiskTime(-1)
|
||||
{
|
||||
}
|
||||
DirectoryContent() {}
|
||||
};
|
||||
std::map<std::string, DirectoryContent> DirectoryContentMap;
|
||||
|
||||
|
||||
@@ -447,8 +447,6 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm)
|
||||
, BuildFileStream(nullptr)
|
||||
, RulesFileStream(nullptr)
|
||||
, CompileCommandsStream(nullptr)
|
||||
, Rules()
|
||||
, AllDependencies()
|
||||
, UsingGCCOnWindows(false)
|
||||
, ComputingUnknownDependencies(false)
|
||||
, PolicyCMP0058(cmPolicies::WARN)
|
||||
|
||||
@@ -217,11 +217,8 @@ protected:
|
||||
// Store per-target progress counters.
|
||||
struct TargetProgress
|
||||
{
|
||||
TargetProgress()
|
||||
: NumberOfActions(0)
|
||||
{
|
||||
}
|
||||
unsigned long NumberOfActions;
|
||||
TargetProgress() {}
|
||||
unsigned long NumberOfActions = 0;
|
||||
std::string VariableFile;
|
||||
std::vector<unsigned long> Marks;
|
||||
void WriteProgressVariables(unsigned long total, unsigned long& current);
|
||||
|
||||
@@ -17,9 +17,7 @@ const std::string cmInstallCommandArguments::EmptyString;
|
||||
|
||||
cmInstallCommandArguments::cmInstallCommandArguments(
|
||||
const std::string& defaultComponent)
|
||||
: Parser()
|
||||
, ArgumentGroup()
|
||||
, Destination(&Parser, "DESTINATION", &ArgumentGroup)
|
||||
: Destination(&Parser, "DESTINATION", &ArgumentGroup)
|
||||
, Component(&Parser, "COMPONENT", &ArgumentGroup)
|
||||
, NamelinkComponent(&Parser, "NAMELINK_COMPONENT", &ArgumentGroup)
|
||||
, ExcludeFromAll(&Parser, "EXCLUDE_FROM_ALL", &ArgumentGroup)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <utility>
|
||||
|
||||
cmInstalledFile::cmInstalledFile()
|
||||
: NameExpression(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string Name;
|
||||
cmCompiledGeneratorExpression* NameExpression;
|
||||
cmCompiledGeneratorExpression* NameExpression = nullptr;
|
||||
PropertyMapType Properties;
|
||||
};
|
||||
|
||||
|
||||
@@ -7,22 +7,18 @@
|
||||
#include <utility> // IWYU pragma: keep
|
||||
|
||||
cmLinkItem::cmLinkItem()
|
||||
: String()
|
||||
, Target(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
cmLinkItem::cmLinkItem(std::string const& n, cmListFileBacktrace const& bt)
|
||||
: String(n)
|
||||
, Target(nullptr)
|
||||
, Backtrace(bt)
|
||||
{
|
||||
}
|
||||
|
||||
cmLinkItem::cmLinkItem(cmGeneratorTarget const* t,
|
||||
cmListFileBacktrace const& bt)
|
||||
: String()
|
||||
, Target(t)
|
||||
: Target(t)
|
||||
, Backtrace(bt)
|
||||
{
|
||||
}
|
||||
@@ -61,7 +57,6 @@ std::ostream& operator<<(std::ostream& os, cmLinkItem const& item)
|
||||
|
||||
cmLinkImplItem::cmLinkImplItem()
|
||||
: cmLinkItem()
|
||||
, FromGenex(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+15
-31
@@ -27,7 +27,7 @@ public:
|
||||
cmLinkItem(std::string const& s, cmListFileBacktrace const& bt);
|
||||
cmLinkItem(cmGeneratorTarget const* t, cmListFileBacktrace const& bt);
|
||||
std::string const& AsStr() const;
|
||||
cmGeneratorTarget const* Target;
|
||||
cmGeneratorTarget const* Target = nullptr;
|
||||
cmListFileBacktrace Backtrace;
|
||||
friend bool operator<(cmLinkItem const& l, cmLinkItem const& r);
|
||||
friend bool operator==(cmLinkItem const& l, cmLinkItem const& r);
|
||||
@@ -39,7 +39,7 @@ class cmLinkImplItem : public cmLinkItem
|
||||
public:
|
||||
cmLinkImplItem();
|
||||
cmLinkImplItem(cmLinkItem item, bool fromGenex);
|
||||
bool FromGenex;
|
||||
bool FromGenex = false;
|
||||
};
|
||||
|
||||
/** The link implementation specifies the direct library
|
||||
@@ -70,36 +70,25 @@ struct cmLinkInterface : public cmLinkInterfaceLibraries
|
||||
|
||||
// Number of repetitions of a strongly connected component of two
|
||||
// or more static libraries.
|
||||
unsigned int Multiplicity;
|
||||
unsigned int Multiplicity = 0;
|
||||
|
||||
// Libraries listed for other configurations.
|
||||
// Needed only for OLD behavior of CMP0003.
|
||||
std::vector<cmLinkItem> WrongConfigLibraries;
|
||||
|
||||
bool ImplementationIsInterface;
|
||||
bool ImplementationIsInterface = false;
|
||||
|
||||
cmLinkInterface()
|
||||
: Multiplicity(0)
|
||||
, ImplementationIsInterface(false)
|
||||
{
|
||||
}
|
||||
cmLinkInterface() {}
|
||||
};
|
||||
|
||||
struct cmOptionalLinkInterface : public cmLinkInterface
|
||||
{
|
||||
cmOptionalLinkInterface()
|
||||
: LibrariesDone(false)
|
||||
, AllDone(false)
|
||||
, Exists(false)
|
||||
, HadHeadSensitiveCondition(false)
|
||||
, ExplicitLibraries(nullptr)
|
||||
{
|
||||
}
|
||||
bool LibrariesDone;
|
||||
bool AllDone;
|
||||
bool Exists;
|
||||
bool HadHeadSensitiveCondition;
|
||||
const char* ExplicitLibraries;
|
||||
cmOptionalLinkInterface() {}
|
||||
bool LibrariesDone = false;
|
||||
bool AllDone = false;
|
||||
bool Exists = false;
|
||||
bool HadHeadSensitiveCondition = false;
|
||||
const char* ExplicitLibraries = nullptr;
|
||||
};
|
||||
|
||||
struct cmHeadToLinkInterfaceMap
|
||||
@@ -116,15 +105,10 @@ struct cmLinkImplementation : public cmLinkImplementationLibraries
|
||||
// Cache link implementation computation from each configuration.
|
||||
struct cmOptionalLinkImplementation : public cmLinkImplementation
|
||||
{
|
||||
cmOptionalLinkImplementation()
|
||||
: LibrariesDone(false)
|
||||
, LanguagesDone(false)
|
||||
, HadHeadSensitiveCondition(false)
|
||||
{
|
||||
}
|
||||
bool LibrariesDone;
|
||||
bool LanguagesDone;
|
||||
bool HadHeadSensitiveCondition;
|
||||
cmOptionalLinkImplementation() {}
|
||||
bool LibrariesDone = false;
|
||||
bool LanguagesDone = false;
|
||||
bool HadHeadSensitiveCondition = false;
|
||||
};
|
||||
|
||||
/** Compute the link type to use for the given configuration. */
|
||||
|
||||
@@ -33,11 +33,8 @@ struct cmCommandContext
|
||||
cmCommandName(std::string const& name) { *this = name; }
|
||||
cmCommandName& operator=(std::string const& name);
|
||||
} Name;
|
||||
long Line;
|
||||
cmCommandContext()
|
||||
: Line(0)
|
||||
{
|
||||
}
|
||||
long Line = 0;
|
||||
cmCommandContext() {}
|
||||
cmCommandContext(const char* name, int line)
|
||||
: Name(name)
|
||||
, Line(line)
|
||||
@@ -53,12 +50,7 @@ struct cmListFileArgument
|
||||
Quoted,
|
||||
Bracket
|
||||
};
|
||||
cmListFileArgument()
|
||||
: Value()
|
||||
, Delim(Unquoted)
|
||||
, Line(0)
|
||||
{
|
||||
}
|
||||
cmListFileArgument() {}
|
||||
cmListFileArgument(const std::string& v, Delimiter d, long line)
|
||||
: Value(v)
|
||||
, Delim(d)
|
||||
@@ -71,8 +63,8 @@ struct cmListFileArgument
|
||||
}
|
||||
bool operator!=(const cmListFileArgument& r) const { return !(*this == r); }
|
||||
std::string Value;
|
||||
Delimiter Delim;
|
||||
long Line;
|
||||
Delimiter Delim = Unquoted;
|
||||
long Line = 0;
|
||||
};
|
||||
|
||||
class cmListFileContext
|
||||
@@ -80,13 +72,8 @@ class cmListFileContext
|
||||
public:
|
||||
std::string Name;
|
||||
std::string FilePath;
|
||||
long Line;
|
||||
cmListFileContext()
|
||||
: Name()
|
||||
, FilePath()
|
||||
, Line(0)
|
||||
{
|
||||
}
|
||||
long Line = 0;
|
||||
cmListFileContext() {}
|
||||
|
||||
static cmListFileContext FromCommandContext(cmCommandContext const& lfcc,
|
||||
std::string const& fileName)
|
||||
|
||||
@@ -264,13 +264,9 @@ private:
|
||||
|
||||
struct LocalObjectEntry
|
||||
{
|
||||
cmGeneratorTarget* Target;
|
||||
cmGeneratorTarget* Target = nullptr;
|
||||
std::string Language;
|
||||
LocalObjectEntry()
|
||||
: Target(nullptr)
|
||||
, Language()
|
||||
{
|
||||
}
|
||||
LocalObjectEntry() {}
|
||||
LocalObjectEntry(cmGeneratorTarget* t, const std::string& lang)
|
||||
: Target(t)
|
||||
, Language(lang)
|
||||
@@ -279,15 +275,10 @@ private:
|
||||
};
|
||||
struct LocalObjectInfo : public std::vector<LocalObjectEntry>
|
||||
{
|
||||
bool HasSourceExtension;
|
||||
bool HasPreprocessRule;
|
||||
bool HasAssembleRule;
|
||||
LocalObjectInfo()
|
||||
: HasSourceExtension(false)
|
||||
, HasPreprocessRule(false)
|
||||
, HasAssembleRule(false)
|
||||
{
|
||||
}
|
||||
bool HasSourceExtension = false;
|
||||
bool HasPreprocessRule = false;
|
||||
bool HasAssembleRule = false;
|
||||
LocalObjectInfo() {}
|
||||
};
|
||||
void GetLocalObjectFiles(
|
||||
std::map<std::string, LocalObjectInfo>& localObjectFiles);
|
||||
|
||||
@@ -2697,13 +2697,9 @@ typedef enum
|
||||
} t_domain;
|
||||
struct t_lookup
|
||||
{
|
||||
t_lookup()
|
||||
: domain(NORMAL)
|
||||
, loc(0)
|
||||
{
|
||||
}
|
||||
t_domain domain;
|
||||
size_t loc;
|
||||
t_lookup() {}
|
||||
t_domain domain = NORMAL;
|
||||
size_t loc = 0;
|
||||
};
|
||||
|
||||
cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <stddef.h>
|
||||
|
||||
cmNewLineStyle::cmNewLineStyle()
|
||||
: NewLineStyle(Invalid)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
const std::string GetCharacters() const;
|
||||
|
||||
private:
|
||||
Style NewLineStyle;
|
||||
Style NewLineStyle = Invalid;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,13 +37,7 @@ class cmCustomCommand;
|
||||
cmNinjaNormalTargetGenerator::cmNinjaNormalTargetGenerator(
|
||||
cmGeneratorTarget* target)
|
||||
: cmNinjaTargetGenerator(target)
|
||||
, TargetNameOut()
|
||||
, TargetNameSO()
|
||||
, TargetNameReal()
|
||||
, TargetNameImport()
|
||||
, TargetNamePDB()
|
||||
, TargetLinkLanguage("")
|
||||
, DeviceLinkObject()
|
||||
{
|
||||
this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
|
||||
if (target->GetType() == cmStateEnums::EXECUTABLE) {
|
||||
|
||||
@@ -54,10 +54,8 @@ cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmGeneratorTarget* target)
|
||||
: cmCommonTargetGenerator(target)
|
||||
, MacOSXContentGenerator(nullptr)
|
||||
, OSXBundleGenerator(nullptr)
|
||||
, MacContentFolders()
|
||||
, LocalGenerator(
|
||||
static_cast<cmLocalNinjaGenerator*>(target->GetLocalGenerator()))
|
||||
, Objects()
|
||||
{
|
||||
MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
|
||||
}
|
||||
|
||||
@@ -28,11 +28,7 @@ public:
|
||||
* Construct with dependency generation marked not done; instance
|
||||
* not placed in cmMakefile's list.
|
||||
*/
|
||||
cmDependInformation()
|
||||
: DependDone(false)
|
||||
, SourceFile(nullptr)
|
||||
{
|
||||
}
|
||||
cmDependInformation() {}
|
||||
|
||||
/**
|
||||
* The set of files on which this one depends.
|
||||
@@ -44,13 +40,13 @@ public:
|
||||
* This flag indicates whether dependency checking has been
|
||||
* performed for this file.
|
||||
*/
|
||||
bool DependDone;
|
||||
bool DependDone = false;
|
||||
|
||||
/**
|
||||
* If this object corresponds to a cmSourceFile instance, this points
|
||||
* to it.
|
||||
*/
|
||||
const cmSourceFile* SourceFile;
|
||||
const cmSourceFile* SourceFile = nullptr;
|
||||
|
||||
/**
|
||||
* Full path to this file.
|
||||
|
||||
@@ -45,10 +45,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, OutputParser* out,
|
||||
}
|
||||
|
||||
cmProcessTools::LineParser::LineParser(char sep, bool ignoreCR)
|
||||
: Log(nullptr)
|
||||
, Prefix(nullptr)
|
||||
, Separator(sep)
|
||||
, LineEnd('\0')
|
||||
: Separator(sep)
|
||||
, IgnoreCR(ignoreCR)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ public:
|
||||
void SetLog(std::ostream* log, const char* prefix);
|
||||
|
||||
protected:
|
||||
std::ostream* Log;
|
||||
const char* Prefix;
|
||||
std::ostream* Log = nullptr;
|
||||
const char* Prefix = nullptr;
|
||||
std::string Line;
|
||||
char Separator;
|
||||
char LineEnd;
|
||||
char LineEnd = '\0';
|
||||
bool IgnoreCR;
|
||||
bool ProcessChunk(const char* data, int length) override;
|
||||
|
||||
|
||||
@@ -25,11 +25,7 @@ public:
|
||||
class Qrc
|
||||
{
|
||||
public:
|
||||
Qrc()
|
||||
: Generated(false)
|
||||
, Unique(false)
|
||||
{
|
||||
}
|
||||
Qrc() {}
|
||||
|
||||
public:
|
||||
std::string LockFile;
|
||||
@@ -40,8 +36,8 @@ public:
|
||||
std::string SettingsFile;
|
||||
std::map<std::string, std::string> ConfigSettingsFile;
|
||||
std::string RccFile;
|
||||
bool Generated;
|
||||
bool Unique;
|
||||
bool Generated = false;
|
||||
bool Unique = false;
|
||||
std::vector<std::string> Options;
|
||||
std::vector<std::string> Resources;
|
||||
};
|
||||
|
||||
@@ -1130,11 +1130,6 @@ void cmQtAutoGeneratorMocUic::WorkerT::UVProcessFinished()
|
||||
cmQtAutoGeneratorMocUic::cmQtAutoGeneratorMocUic()
|
||||
: Base_(&FileSys())
|
||||
, Moc_(&FileSys())
|
||||
, Stage_(StageT::SETTINGS_READ)
|
||||
, JobsRemain_(0)
|
||||
, JobError_(false)
|
||||
, JobThreadsAbort_(false)
|
||||
, MocAutoFileUpdated_(false)
|
||||
{
|
||||
// Precompile regular expressions
|
||||
Moc_.RegExpInclude.compile(
|
||||
|
||||
@@ -404,7 +404,7 @@ private:
|
||||
MocSettingsT Moc_;
|
||||
UicSettingsT Uic_;
|
||||
// -- Progress
|
||||
StageT Stage_;
|
||||
StageT Stage_ = StageT::SETTINGS_READ;
|
||||
// -- Job queues
|
||||
std::mutex JobsMutex_;
|
||||
struct
|
||||
@@ -416,15 +416,15 @@ private:
|
||||
JobQueueT Uic;
|
||||
} JobQueues_;
|
||||
JobQueueT JobQueue_;
|
||||
std::size_t volatile JobsRemain_;
|
||||
bool volatile JobError_;
|
||||
bool volatile JobThreadsAbort_;
|
||||
std::size_t volatile JobsRemain_ = 0;
|
||||
bool volatile JobError_ = false;
|
||||
bool volatile JobThreadsAbort_ = false;
|
||||
std::condition_variable JobsConditionRead_;
|
||||
// -- Moc meta
|
||||
std::set<std::string> MocIncludedStrings_;
|
||||
std::set<std::string> MocIncludedFiles_;
|
||||
std::set<std::string> MocAutoFiles_;
|
||||
bool volatile MocAutoFileUpdated_;
|
||||
bool volatile MocAutoFileUpdated_ = false;
|
||||
// -- Settings file
|
||||
std::string SettingsFile_;
|
||||
std::string SettingsStringMoc_;
|
||||
|
||||
@@ -15,12 +15,6 @@
|
||||
// -- Class methods
|
||||
|
||||
cmQtAutoGeneratorRcc::cmQtAutoGeneratorRcc()
|
||||
: MultiConfig_(false)
|
||||
, SettingsChanged_(false)
|
||||
, Stage_(StageT::SETTINGS_READ)
|
||||
, Error_(false)
|
||||
, Generate_(false)
|
||||
, BuildFileChanged_(false)
|
||||
{
|
||||
// Initialize libuv asynchronous iteration request
|
||||
UVRequest().init(*UVLoop(), &cmQtAutoGeneratorRcc::UVPollStage, this);
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
|
||||
private:
|
||||
// -- Config settings
|
||||
bool MultiConfig_;
|
||||
bool MultiConfig_ = false;
|
||||
// -- Directories
|
||||
std::string AutogenBuildDir_;
|
||||
std::string IncludeDir_;
|
||||
@@ -95,12 +95,12 @@ private:
|
||||
// -- Settings file
|
||||
std::string SettingsFile_;
|
||||
std::string SettingsString_;
|
||||
bool SettingsChanged_;
|
||||
bool SettingsChanged_ = false;
|
||||
// -- libuv loop
|
||||
StageT Stage_;
|
||||
bool Error_;
|
||||
bool Generate_;
|
||||
bool BuildFileChanged_;
|
||||
StageT Stage_ = StageT::SETTINGS_READ;
|
||||
bool Error_ = false;
|
||||
bool Generate_ = false;
|
||||
bool BuildFileChanged_ = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,10 +12,7 @@
|
||||
class cmScriptGeneratorIndent
|
||||
{
|
||||
public:
|
||||
cmScriptGeneratorIndent()
|
||||
: Level(0)
|
||||
{
|
||||
}
|
||||
cmScriptGeneratorIndent() {}
|
||||
cmScriptGeneratorIndent(int level)
|
||||
: Level(level)
|
||||
{
|
||||
@@ -32,7 +29,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
int Level;
|
||||
int Level = 0;
|
||||
};
|
||||
inline std::ostream& operator<<(std::ostream& os,
|
||||
cmScriptGeneratorIndent indent)
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
#include <assert.h>
|
||||
|
||||
cmSourceFileLocation::cmSourceFileLocation()
|
||||
: Makefile(nullptr)
|
||||
, AmbiguousDirectory(true)
|
||||
, AmbiguousExtension(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -83,9 +83,9 @@ public:
|
||||
cmMakefile const* GetMakefile() const { return this->Makefile; }
|
||||
|
||||
private:
|
||||
cmMakefile const* const Makefile;
|
||||
bool AmbiguousDirectory;
|
||||
bool AmbiguousExtension;
|
||||
cmMakefile const* const Makefile = nullptr;
|
||||
bool AmbiguousDirectory = true;
|
||||
bool AmbiguousExtension = true;
|
||||
std::string Directory;
|
||||
std::string Name;
|
||||
|
||||
|
||||
@@ -22,14 +22,6 @@
|
||||
#include "cmake.h"
|
||||
|
||||
cmState::cmState()
|
||||
: IsInTryCompile(false)
|
||||
, IsGeneratorMultiConfig(false)
|
||||
, WindowsShell(false)
|
||||
, WindowsVSIDE(false)
|
||||
, WatcomWMake(false)
|
||||
, MinGWMake(false)
|
||||
, NMake(false)
|
||||
, MSYSShell(false)
|
||||
{
|
||||
this->CacheManager = new cmCacheManager;
|
||||
this->GlobVerificationManager = new cmGlobVerificationManager;
|
||||
|
||||
+8
-8
@@ -202,14 +202,14 @@ private:
|
||||
|
||||
std::string SourceDirectory;
|
||||
std::string BinaryDirectory;
|
||||
bool IsInTryCompile;
|
||||
bool IsGeneratorMultiConfig;
|
||||
bool WindowsShell;
|
||||
bool WindowsVSIDE;
|
||||
bool WatcomWMake;
|
||||
bool MinGWMake;
|
||||
bool NMake;
|
||||
bool MSYSShell;
|
||||
bool IsInTryCompile = false;
|
||||
bool IsGeneratorMultiConfig = false;
|
||||
bool WindowsShell = false;
|
||||
bool WindowsVSIDE = false;
|
||||
bool WatcomWMake = false;
|
||||
bool MinGWMake = false;
|
||||
bool NMake = false;
|
||||
bool MSYSShell = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,8 +50,7 @@ struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap
|
||||
{
|
||||
typedef cmPolicies::PolicyMap derived;
|
||||
PolicyStackEntry(bool w = false)
|
||||
: derived()
|
||||
, Weak(w)
|
||||
: Weak(w)
|
||||
{
|
||||
}
|
||||
PolicyStackEntry(derived const& d, bool w)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
cmStateSnapshot::cmStateSnapshot(cmState* state)
|
||||
: State(state)
|
||||
, Position()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -625,8 +625,7 @@ private:
|
||||
|
||||
// Internal constructor for view of statically allocated string.
|
||||
String(string_view v, Private)
|
||||
: string_()
|
||||
, view_(v)
|
||||
: view_(v)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ private:
|
||||
}
|
||||
RegexReplacement(int n)
|
||||
: Number(n)
|
||||
, Value()
|
||||
{
|
||||
}
|
||||
RegexReplacement() {}
|
||||
|
||||
+24
-15
@@ -3,7 +3,6 @@
|
||||
#pragma once
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
@@ -11,12 +10,22 @@
|
||||
|
||||
#include "cm_uv.h"
|
||||
|
||||
#define CM_PERFECT_FWD_CTOR(Class, FwdTo) \
|
||||
template <typename... Args> \
|
||||
Class(Args&&... args) \
|
||||
: FwdTo(std::forward<Args>(args)...) \
|
||||
{ \
|
||||
}
|
||||
#if defined(__SUNPRO_CC)
|
||||
|
||||
# include <utility>
|
||||
|
||||
# define CM_INHERIT_CTOR(Class, Base, Tpl) \
|
||||
template <typename... Args> \
|
||||
Class(Args&&... args) \
|
||||
: Base Tpl(std::forward<Args>(args)...) \
|
||||
{ \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
# define CM_INHERIT_CTOR(Class, Base, Tpl) using Base Tpl ::Base;
|
||||
|
||||
#endif
|
||||
|
||||
namespace cm {
|
||||
|
||||
@@ -116,7 +125,7 @@ class uv_handle_ptr_ : public uv_handle_ptr_base_<T>
|
||||
friend class uv_handle_ptr_;
|
||||
|
||||
public:
|
||||
CM_PERFECT_FWD_CTOR(uv_handle_ptr_, uv_handle_ptr_base_<T>);
|
||||
CM_INHERIT_CTOR(uv_handle_ptr_, uv_handle_ptr_base_, <T>);
|
||||
|
||||
/***
|
||||
* Allow less verbose calling of uv_<T> functions
|
||||
@@ -133,13 +142,13 @@ template <>
|
||||
class uv_handle_ptr_<uv_handle_t> : public uv_handle_ptr_base_<uv_handle_t>
|
||||
{
|
||||
public:
|
||||
CM_PERFECT_FWD_CTOR(uv_handle_ptr_, uv_handle_ptr_base_<uv_handle_t>);
|
||||
CM_INHERIT_CTOR(uv_handle_ptr_, uv_handle_ptr_base_, <uv_handle_t>);
|
||||
};
|
||||
|
||||
class uv_async_ptr : public uv_handle_ptr_<uv_async_t>
|
||||
{
|
||||
public:
|
||||
CM_PERFECT_FWD_CTOR(uv_async_ptr, uv_handle_ptr_<uv_async_t>);
|
||||
CM_INHERIT_CTOR(uv_async_ptr, uv_handle_ptr_, <uv_async_t>);
|
||||
|
||||
int init(uv_loop_t& loop, uv_async_cb async_cb, void* data = nullptr);
|
||||
|
||||
@@ -148,7 +157,7 @@ public:
|
||||
|
||||
struct uv_signal_ptr : public uv_handle_ptr_<uv_signal_t>
|
||||
{
|
||||
CM_PERFECT_FWD_CTOR(uv_signal_ptr, uv_handle_ptr_<uv_signal_t>);
|
||||
CM_INHERIT_CTOR(uv_signal_ptr, uv_handle_ptr_, <uv_signal_t>);
|
||||
|
||||
int init(uv_loop_t& loop, void* data = nullptr);
|
||||
|
||||
@@ -159,7 +168,7 @@ struct uv_signal_ptr : public uv_handle_ptr_<uv_signal_t>
|
||||
|
||||
struct uv_pipe_ptr : public uv_handle_ptr_<uv_pipe_t>
|
||||
{
|
||||
CM_PERFECT_FWD_CTOR(uv_pipe_ptr, uv_handle_ptr_<uv_pipe_t>);
|
||||
CM_INHERIT_CTOR(uv_pipe_ptr, uv_handle_ptr_, <uv_pipe_t>);
|
||||
|
||||
operator uv_stream_t*() const;
|
||||
|
||||
@@ -168,7 +177,7 @@ struct uv_pipe_ptr : public uv_handle_ptr_<uv_pipe_t>
|
||||
|
||||
struct uv_process_ptr : public uv_handle_ptr_<uv_process_t>
|
||||
{
|
||||
CM_PERFECT_FWD_CTOR(uv_process_ptr, uv_handle_ptr_<uv_process_t>);
|
||||
CM_INHERIT_CTOR(uv_process_ptr, uv_handle_ptr_, <uv_process_t>);
|
||||
|
||||
int spawn(uv_loop_t& loop, uv_process_options_t const& options,
|
||||
void* data = nullptr);
|
||||
@@ -176,7 +185,7 @@ struct uv_process_ptr : public uv_handle_ptr_<uv_process_t>
|
||||
|
||||
struct uv_timer_ptr : public uv_handle_ptr_<uv_timer_t>
|
||||
{
|
||||
CM_PERFECT_FWD_CTOR(uv_timer_ptr, uv_handle_ptr_<uv_timer_t>);
|
||||
CM_INHERIT_CTOR(uv_timer_ptr, uv_handle_ptr_, <uv_timer_t>);
|
||||
|
||||
int init(uv_loop_t& loop, void* data = nullptr);
|
||||
|
||||
@@ -185,7 +194,7 @@ struct uv_timer_ptr : public uv_handle_ptr_<uv_timer_t>
|
||||
|
||||
struct uv_tty_ptr : public uv_handle_ptr_<uv_tty_t>
|
||||
{
|
||||
CM_PERFECT_FWD_CTOR(uv_tty_ptr, uv_handle_ptr_<uv_tty_t>);
|
||||
CM_INHERIT_CTOR(uv_tty_ptr, uv_handle_ptr_, <uv_tty_t>);
|
||||
|
||||
operator uv_stream_t*() const;
|
||||
|
||||
|
||||
@@ -63,15 +63,10 @@ public:
|
||||
protected:
|
||||
struct Pair
|
||||
{
|
||||
WatchMethod Method;
|
||||
void* ClientData;
|
||||
DeleteData DeleteDataCall;
|
||||
Pair()
|
||||
: Method(nullptr)
|
||||
, ClientData(nullptr)
|
||||
, DeleteDataCall(nullptr)
|
||||
{
|
||||
}
|
||||
WatchMethod Method = nullptr;
|
||||
void* ClientData = nullptr;
|
||||
DeleteData DeleteDataCall = nullptr;
|
||||
Pair() {}
|
||||
~Pair()
|
||||
{
|
||||
if (this->DeleteDataCall && this->ClientData) {
|
||||
|
||||
Reference in New Issue
Block a user