Commit ce43daf2 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Move ScopedFile class to utils.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent f7e20464
...@@ -27,21 +27,6 @@ using std::string; ...@@ -27,21 +27,6 @@ using std::string;
using std::vector; using std::vector;
using std::regex; using std::regex;
class ScopedFile
{
FILE *m_file;
public:
ScopedFile (FILE *f) :
m_file (f)
{
}
~ScopedFile()
{
if (m_file)
fclose (m_file);
}
};
class TSPacket class TSPacket
{ {
public: public:
......
...@@ -103,4 +103,19 @@ private: ...@@ -103,4 +103,19 @@ private:
std::string m_message; std::string m_message;
}; };
class ScopedFile
{
FILE *m_file;
public:
ScopedFile (FILE *f) :
m_file (f)
{
}
~ScopedFile()
{
if (m_file)
fclose (m_file);
}
};
#endif /* AUDIOWMARK_UTILS_HH */ #endif /* AUDIOWMARK_UTILS_HH */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment