diff options
Diffstat (limited to 'src/hir/path.cpp')
-rw-r--r-- | src/hir/path.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/hir/path.cpp b/src/hir/path.cpp index 6a8b2c07..3cc1d817 100644 --- a/src/hir/path.cpp +++ b/src/hir/path.cpp @@ -85,6 +85,15 @@ namespace HIR { rv.m_types.push_back( t.clone() ); return rv; } +bool ::HIR::PathParams::operator==(const ::HIR::PathParams& x) const +{ + if( m_types.size() != x.m_types.size() ) + return false; + for( unsigned int i = 0; i < m_types.size(); i ++ ) + if( !(m_types[i] == x.m_types[i]) ) + return false; + return true; +} ::HIR::GenericPath::GenericPath() { @@ -102,6 +111,12 @@ namespace HIR { { return GenericPath(m_path.clone(), m_params.clone()); } +bool ::HIR::GenericPath::operator==(const GenericPath& x) const +{ + if( m_path != x.m_path ) + return false; + return m_params == x.m_params; +} ::HIR::Path::Path(::HIR::GenericPath gp): |