Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45285 )

Change subject: dev: Overload swap_bytes, don't specialize the template.
......................................................................

dev: Overload swap_bytes, don't specialize the template.

The effect is the same, the rules for overloads are easier to work with
than the rules for templates, and it removes the assumption that
swap_bytes actually is a template.

Also some minor style fixes.

Change-Id: Id9439177185b5269dd89605bbd05b09390a18d40
---
M src/dev/virtio/base.hh
1 file changed, 6 insertions(+), 4 deletions(-)



diff --git a/src/dev/virtio/base.hh b/src/dev/virtio/base.hh
index 8b20be1..416d3a4 100644
--- a/src/dev/virtio/base.hh
+++ b/src/dev/virtio/base.hh
@@ -68,15 +68,17 @@
  */


-template <> inline vring_used_elem
-swap_byte(vring_used_elem v) {
+static inline vring_used_elem
+swap_byte(vring_used_elem v)
+{
     v.id = swap_byte(v.id);
     v.len = swap_byte(v.len);
     return v;
 }

-template <> inline vring_desc
-swap_byte(vring_desc v) {
+static inline vring_desc
+swap_byte(vring_desc v)
+{
     v.addr = swap_byte(v.addr);
     v.len = swap_byte(v.len);
     v.flags = swap_byte(v.flags);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45285
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id9439177185b5269dd89605bbd05b09390a18d40
Gerrit-Change-Number: 45285
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to