Commit c29769c2 by Aaron Leung

Fixing a portability problem -- apparently, older versions of C++ don't…

Fixing a portability problem -- apparently, older versions of C++ don't automatically zero out objects in their default constructors.
parent 4f8d92e5
...@@ -209,7 +209,7 @@ namespace Sass { ...@@ -209,7 +209,7 @@ namespace Sass {
}; };
struct Node_Impl { struct Node_Impl {
union { union value_t {
bool boolean; bool boolean;
double numeric; double numeric;
Token token; Token token;
...@@ -233,6 +233,22 @@ namespace Sass { ...@@ -233,6 +233,22 @@ namespace Sass {
bool should_eval; bool should_eval;
bool is_unquoted; bool is_unquoted;
Node_Impl()
: /* value(value_t()),
children(vector<Node>()),
path(string()),
line(0),
type(Node::none), */
has_children(false),
has_statements(false),
has_blocks(false),
has_expansions(false),
has_backref(false),
from_variable(false),
should_eval(false),
is_unquoted(false)
{ }
bool is_numeric() bool is_numeric()
{ return type >= Node::number && type <= Node::numeric_dimension; } { return type >= Node::number && type <= Node::numeric_dimension; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment