mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-30 19:01:02 -07:00
Code::is_equal reduction
This commit is contained in:
@ -354,17 +354,6 @@ CodeBody gen_ast_inlines()
|
||||
char const* code_impl_tmpl = stringize(
|
||||
\n
|
||||
inline
|
||||
bool <typename>::is_equal( Code other )
|
||||
{
|
||||
if ( ast == nullptr || other.ast == nullptr )
|
||||
{
|
||||
// Just check if they're both null.
|
||||
// log_failure( "Code::is_equal: Cannot compare code, AST is null!" );
|
||||
return ast == nullptr && other.ast == nullptr;
|
||||
}
|
||||
return rcast(AST*, ast)->is_equal( other.ast );
|
||||
}
|
||||
inline
|
||||
bool <typename>::is_valid()
|
||||
{
|
||||
return (AST*) ast != nullptr && rcast( AST*, ast)->Type != CodeT::Invalid;
|
||||
|
Reference in New Issue
Block a user