mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[llvm-objdump] Use initializer list for scoped xar api constructors
llvm-svn: 315243
This commit is contained in:
parent
a8d5bff9e7
commit
a55e7b5513
@ -206,9 +206,8 @@ typedef DiceTable::iterator dice_table_iterator;
|
||||
namespace {
|
||||
struct ScopedXarFile {
|
||||
xar_t xar;
|
||||
ScopedXarFile(const char *filename, int32_t flags) {
|
||||
xar = xar_open(filename, flags);
|
||||
}
|
||||
ScopedXarFile(const char *filename, int32_t flags)
|
||||
: xar(xar_open(filename, flags)) {}
|
||||
~ScopedXarFile() {
|
||||
if (xar)
|
||||
xar_close(xar);
|
||||
@ -220,7 +219,7 @@ struct ScopedXarFile {
|
||||
|
||||
struct ScopedXarIter {
|
||||
xar_iter_t iter;
|
||||
ScopedXarIter() { iter = xar_iter_new(); }
|
||||
ScopedXarIter() : iter(xar_iter_new()) {}
|
||||
~ScopedXarIter() {
|
||||
if (iter)
|
||||
xar_iter_free(iter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user