From b34252bf0fe577c2ee25be885ee6a3d48e9cff51 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 22 Jul 2019 17:26:06 +0200 Subject: [PATCH] Fixed compilation on clang. --- src/slic3r/Utils/UndoRedo.cpp | 4 ++++ src/slic3r/Utils/UndoRedo.hpp | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/slic3r/Utils/UndoRedo.cpp b/src/slic3r/Utils/UndoRedo.cpp index 6eaede6d7..72e7431bd 100644 --- a/src/slic3r/Utils/UndoRedo.cpp +++ b/src/slic3r/Utils/UndoRedo.cpp @@ -35,6 +35,10 @@ namespace Slic3r { namespace UndoRedo { +SnapshotData::SnapshotData() : printer_technology(ptUnknown), flags(0) +{ +} + static std::string topmost_snapshot_name = "@@@ Topmost @@@"; bool Snapshot::is_topmost() const diff --git a/src/slic3r/Utils/UndoRedo.hpp b/src/slic3r/Utils/UndoRedo.hpp index a5ebd62e8..c17802560 100644 --- a/src/slic3r/Utils/UndoRedo.hpp +++ b/src/slic3r/Utils/UndoRedo.hpp @@ -28,10 +28,12 @@ namespace UndoRedo { // which may be handy sometimes. struct SnapshotData { - PrinterTechnology printer_technology = ptUnknown; - // Bitmap of Flags (see the Flags enum). - unsigned int flags = 0; + // Constructor is defined in .cpp due to the forward declaration of enum PrinterTechnology. + SnapshotData(); + PrinterTechnology printer_technology; + // Bitmap of Flags (see the Flags enum). + unsigned int flags; // Bitmask of various binary flags to be stored with the snapshot. enum Flags {