Skip to content

Implents issue #330 Split do_compare in two methods without optional arguments #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/uvmsc/base/uvm_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,16 @@ bool uvm_object::compare( const uvm_object& rhs,
//! otherwise.
//----------------------------------------------------------------------------

bool uvm_object::do_compare( const uvm_object& rhs) const
{
uvm_report_warning("DOCOMP", "member function do_compare not implemented in " + get_type_name(), UVM_HIGH);
return true;
}

bool uvm_object::do_compare( const uvm_object& rhs,
const uvm_comparer* comparer ) const
{
uvm_report_warning("DOCOMP", "member function do_compare not implemented in " + get_type_name(), UVM_HIGH);
uvm_report_warning("DOCOMP", "member function do_compare with comparer argument not implemented in " + get_type_name(), UVM_HIGH);
return true;
}

Expand Down
4 changes: 3 additions & 1 deletion src/uvmsc/base/uvm_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ class uvm_object : public uvm_void

bool compare( const uvm_object& rhs, const uvm_comparer* comparer = nullptr ) const;

virtual bool do_compare( const uvm_object& rhs) const;

virtual bool do_compare( const uvm_object& rhs,
const uvm_comparer* comparer = nullptr ) const;
const uvm_comparer* comparer) const;

//--------------------------------------------------------------------------
// Group: Packing
Expand Down