Work around an MSVC2013 value-initialization bug.
See https://connect.microsoft.com/VisualStudio/feedback/details/793506.
This commit is contained in:
parent
9d2a035a71
commit
86f0439521
@ -441,7 +441,11 @@ public:
|
|||||||
// Necessary for Entity e = {} to zero-initialize, since
|
// Necessary for Entity e = {} to zero-initialize, since
|
||||||
// classes with base classes are not aggregates and
|
// classes with base classes are not aggregates and
|
||||||
// the default constructor does not initialize members.
|
// 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(),
|
actDistance(), actVisible(), style(), construction(),
|
||||||
dogd() {};
|
dogd() {};
|
||||||
|
|
||||||
@ -624,7 +628,7 @@ public:
|
|||||||
class Constraint : public ConstraintBase {
|
class Constraint : public ConstraintBase {
|
||||||
public:
|
public:
|
||||||
// See Entity::Entity().
|
// See Entity::Entity().
|
||||||
Constraint() : ConstraintBase(), disp(), dogd() {}
|
Constraint() : ConstraintBase({}), disp(), dogd() {}
|
||||||
|
|
||||||
// These define how the constraint is drawn on-screen.
|
// These define how the constraint is drawn on-screen.
|
||||||
struct {
|
struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user