mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
Diagnostics: Ensure state is initialized
Tweak how we define the storage type for diagnostic state to ensure that the memory is always initialized.
This commit is contained in:
1 parent
46410ea189
commit
0556d1cfe9
3 files changed
+7
-1
No files matched your search
@@ -101,7 +101,11 @@ public:
|
||||
cm::string_view name);
|
||||
|
||||
/** Represent a set of diagnostic category actions. */
|
||||
using DiagnosticMap = std::array<DiagnosticAction, CategoryCount>;
|
||||
struct DiagnosticMap : public std::array<DiagnosticAction, CategoryCount>
|
||||
{
|
||||
DiagnosticMap()
|
||||
: array{} {};
|
||||
};
|
||||
};
|
||||
|
||||
using cmDiagnosticCategory = cmDiagnostics::DiagnosticCategory;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "cmMakefile.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "cmMessenger.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
Reference in new issue
Block a user