Move to pass by value since most events are very small in size.
We can look at pass by reference but will need to create multiple
versions to handle temp objects.
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
virtual ~EventHandler() {}
% for name in protos['event_names']:
- virtual void Handle(${name}&& event) {}
+ virtual void Handle(${name} event) {}
% endfor
};
}
% for name in protos['event_names']:
//////////////////////////////////////////////////////////////////////////
/// @brief Handle ${name} event
- virtual void Handle(${name}&& event)
+ virtual void Handle(${name} event)
{
% if protos['events'][name]['num_fields'] == 0:
Write(${protos['events'][name]['event_id']}, (char*)&event.data, 0);