diff --git a/src/sketch.h b/src/sketch.h index 95445ff..c61bdbf 100644 --- a/src/sketch.h +++ b/src/sketch.h @@ -441,7 +441,11 @@ public: // Necessary for Entity e = {} to zero-initialize, since // classes with base classes are not aggregates and // the default constructor does not initialize members. - Entity() : EntityBase(), forceHidden(), actPoint(), actNormal(), + // + // Note EntityBase({}); without explicitly value-initializing + // the base class, MSVC2013 will default-initialize it, leaving + // POD members with indeterminate value. + Entity() : EntityBase({}), forceHidden(), actPoint(), actNormal(), actDistance(), actVisible(), style(), construction(), dogd() {}; @@ -624,7 +628,7 @@ public: class Constraint : public ConstraintBase { public: // See Entity::Entity(). - Constraint() : ConstraintBase(), disp(), dogd() {} + Constraint() : ConstraintBase({}), disp(), dogd() {} // These define how the constraint is drawn on-screen. struct {