Obj: remove Location::delete_data, nobody ever sets it

This allows removing the destructor completely, making the class
trivially-destructible.
This commit is contained in:
Max Kellermann 2020-02-04 10:36:47 +01:00
parent 2041921fcb
commit 91e0860cd4

View file

@ -15,7 +15,6 @@ public:
last_line = line_l;
first_column = col_f;
last_column = col_l;
delete_data = false;
timestamp = 0;
text = 0;
@ -25,17 +24,10 @@ public:
{
filename = 0;
first_line = last_line = first_column = last_column = 0;
delete_data = false;
timestamp = 0;
text = 0;
}
~Location()
{
if ( delete_data )
delete [] filename;
}
void Describe(ODesc* d) const;
bool operator==(const Location& l) const;
@ -45,7 +37,6 @@ public:
const char* filename;
int first_line, last_line;
int first_column, last_column;
bool delete_data;
// Timestamp and text for compatibility with Bison's default yyltype.
int timestamp;