mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 09:02:25 +00:00
fix backward propagateSideEffect impl
This commit is contained in:
parent
d8e9b1b35d
commit
896d4c53a3
2 changed files with 4 additions and 3 deletions
5
ast.cpp
5
ast.cpp
|
@ -24,9 +24,10 @@ ast_node::~ast_node()
|
|||
}
|
||||
|
||||
/* weight and side effects */
|
||||
void ast_node::propagateSideEffects(ast_node *other) const
|
||||
void ast_node::propagateSideEffects(const ast_node *other)
|
||||
{
|
||||
other->m_side_effects = m_side_effects;
|
||||
if (other->m_side_effects)
|
||||
m_side_effects = true;
|
||||
}
|
||||
|
||||
/* General expression initialization */
|
||||
|
|
2
ast.h
2
ast.h
|
@ -110,7 +110,7 @@ struct ast_node
|
|||
bool m_keep_node;
|
||||
bool m_side_effects;
|
||||
|
||||
void propagateSideEffects(ast_node *other) const;
|
||||
void propagateSideEffects(const ast_node *other);
|
||||
};
|
||||
|
||||
#define ast_unref(x) do \
|
||||
|
|
Loading…
Reference in a new issue