Skip to content

Commit

Permalink
finish removal of CleanupGuard from 053b49e
Browse files Browse the repository at this point in the history
Found via compiler warning about unused cleanup()
  • Loading branch information
dekarl committed Feb 9, 2016
1 parent e2fa1ea commit b5a5624
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions mythplugins/mytharchive/mytharchivehelper/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,33 +77,6 @@ extern "C" {
#include "../mytharchive/archiveutil.h"
#include "../mytharchive/remoteavformatcontext.h"

namespace
{
void cleanup()
{
delete gContext;
gContext = NULL;
}

class CleanupGuard
{
public:
typedef void (*CleanupFunc)();

public:
CleanupGuard(CleanupFunc cleanFunction) :
m_cleanFunction(cleanFunction) {}

~CleanupGuard()
{
m_cleanFunction();
}

private:
CleanupFunc m_cleanFunction;
};
}

class NativeArchive
{
public:
Expand Down Expand Up @@ -2399,7 +2372,6 @@ int main(int argc, char **argv)
// Don't listen to console input
close(0);

//CleanupGuard callCleanup(cleanup);
gContext = new MythContext(MYTH_BINARY_VERSION);
if (!gContext->Init(false))
{
Expand Down

0 comments on commit b5a5624

Please sign in to comment.