git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315243
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
struct ScopedXarIter {
xar_iter_t iter;
- ScopedXarIter() { iter = xar_iter_new(); }
+ ScopedXarIter() : iter(xar_iter_new()) {}
~ScopedXarIter() {
if (iter)
xar_iter_free(iter);