Skip to content

Commit e70fa68

Browse files
committed
cwe-name-lookup: use std::unique_ptr instead of raw pointers
1 parent 24beed8 commit e70fa68

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/lib/cwe-name-lookup.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ CweNameLookup::CweNameLookup():
3636

3737
CweNameLookup::~CweNameLookup()
3838
{
39-
delete d;
4039
}
4140

4241
bool CweNameLookup::handleLine(const TStringList &fields)

src/lib/cwe-name-lookup.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020 Red Hat, Inc.
2+
* Copyright (C) 2020-2023 Red Hat, Inc.
33
*
44
* This file is part of csdiff.
55
*
@@ -38,7 +38,7 @@ class CweNameLookup: public AbstractCsvParser {
3838

3939
private:
4040
struct Private;
41-
Private *d;
41+
std::unique_ptr<Private> d;
4242
};
4343

4444
#endif /* H_GUARD_CWE_NAME_LOOKUP_H */

0 commit comments

Comments
 (0)