Use default copy-constructor for LineInfo

The LineInfo class defines a copy-constructor, but relies on the default
copy-assignment operator.

In newer versions of C++ this deprecated and modern compilers generate a
warning about this. A class must either use the default copy-constructor
and default copy-assignment operator or provide a user defined version of
both.

Since the current user-defined copy-constructor for LineInfo does the same
as the default copy-constructor, remove the custom one and rely on the
default constructor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-03-28 05:48:58 +02:00
parent 72b0498af4
commit dda960dce4
2 changed files with 0 additions and 6 deletions

View File

@ -27,11 +27,6 @@ LineInfo::LineInfo()
{ {
} }
LineInfo::LineInfo(const LineInfo&that) :
file_(that.file_), lineno_(that.lineno_)
{
}
LineInfo::~LineInfo() LineInfo::~LineInfo()
{ {
} }

View File

@ -34,7 +34,6 @@
class LineInfo { class LineInfo {
public: public:
LineInfo(); LineInfo();
LineInfo(const LineInfo&that);
virtual ~LineInfo(); virtual ~LineInfo();
// Get a fully formatted file/lineno // Get a fully formatted file/lineno