mem-ruby: removed Message copy constructors
Prevents error with deprecated implicitly-declared operator= when Message assignment operator is used. The copy constructor in the Message class and the ones generated from SLICC are not doing anything special so use the compiler-generated ones instead. Change-Id: I0edec4a44cbb7858f07ed2f2f189455994055c33 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41813 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -62,12 +62,7 @@ class Message
|
||||
m_DelayedTicks(0), m_msg_counter(0)
|
||||
{ }
|
||||
|
||||
Message(const Message &other)
|
||||
: m_time(other.m_time),
|
||||
m_LastEnqueueTime(other.m_LastEnqueueTime),
|
||||
m_DelayedTicks(other.m_DelayedTicks),
|
||||
m_msg_counter(other.m_msg_counter)
|
||||
{ }
|
||||
Message(const Message &other) = default;
|
||||
|
||||
virtual ~Message() { }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020 ARM Limited
|
||||
# Copyright (c) 2020-2021 ARM Limited
|
||||
# All rights reserved.
|
||||
#
|
||||
# The license below extends only to copyright in the software and shall
|
||||
@@ -259,23 +259,7 @@ $klass ${{self.c_ident}}$parent
|
||||
code('}')
|
||||
|
||||
# ******** Copy constructor ********
|
||||
if not self.isGlobal:
|
||||
code('${{self.c_ident}}(const ${{self.c_ident}}&other)')
|
||||
|
||||
# Call superclass constructor
|
||||
if "interface" in self:
|
||||
code(' : ${{self["interface"]}}(other)')
|
||||
|
||||
code('{')
|
||||
code.indent()
|
||||
|
||||
for dm in self.data_members.values():
|
||||
code('m_${{dm.ident}} = other.m_${{dm.ident}};')
|
||||
|
||||
code.dedent()
|
||||
code('}')
|
||||
else:
|
||||
code('${{self.c_ident}}(const ${{self.c_ident}}&) = default;')
|
||||
code('${{self.c_ident}}(const ${{self.c_ident}}&) = default;')
|
||||
|
||||
# ******** Assignment operator ********
|
||||
|
||||
|
||||
Reference in New Issue
Block a user