summaryrefslogtreecommitdiff
path: root/cabinet/magic.cpp
blob: f8d7337aa222643f53e9fa00c0f3ff92ae35e25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <cabinet/magic.hpp>

#include <magic.h>

#include <utility>

namespace cab
{

  magic::magic(magic::flags flags)
      : m_cookie{magic_open(std::to_underlying(flags))}
  {}

  magic::~magic()
  {
    magic_close(m_cookie);
  }

}  // namespace cab