diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-08 20:35:17 +1000 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-08 20:35:17 +1000 |
commit | be90eac2507d21761912a8e8a89f2e4daf945e27 (patch) | |
tree | ad1384ff25bea06fddd1295bf84c8c957019e5e7 /src | |
parent | 6822e2477bd227609dba1c7185c3366254a751f9 (diff) | |
download | mrust-be90eac2507d21761912a8e8a89f2e4daf945e27.tar.gz |
HIR Typecheck CS - Reduce log spam by not clearing 'changed' flag when testing for ivar default
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 7 | ||||
-rw-r--r-- | src/hir_typeck/helpers.hpp | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 238b0314..36bd1480 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -2927,18 +2927,13 @@ void Typecheck_Code_CS(const typeck::ModuleState& ms, t_args& args, const ::HIR: // Finally. If nothing changed, apply ivar defaults - if( !context.take_changed() ) + if( !context.m_ivars.peek_changed() ) { DEBUG("- Applying defaults"); if( context.m_ivars.apply_defaults() ) { context.m_ivars.mark_change(); } } - else - { - // - Mark it back - context.m_ivars.mark_change(); - } count ++; context.m_resolve.compact_ivars(context.m_ivars); diff --git a/src/hir_typeck/helpers.hpp b/src/hir_typeck/helpers.hpp index 5d613a5c..659f96b3 100644 --- a/src/hir_typeck/helpers.hpp +++ b/src/hir_typeck/helpers.hpp @@ -56,6 +56,9 @@ public: m_has_changed(false) {} + bool peek_changed() const { + return m_has_changed; + } bool take_changed() { bool rv = m_has_changed; m_has_changed = false; |