deskflow/src/lib/base/FunctionJob.cpp

25 lines
479 B
C++
Raw Normal View History

2012-06-10 16:50:54 +00:00
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
2012-06-10 16:50:54 +00:00
*/
#include "base/FunctionJob.h"
2012-06-10 16:50:54 +00:00
//
2014-11-11 13:51:47 +00:00
// FunctionJob
2012-06-10 16:50:54 +00:00
//
FunctionJob::FunctionJob(void (*func)(void *), void *arg) : m_func(func), m_arg(arg)
{
// do nothing
2012-06-10 16:50:54 +00:00
}
void FunctionJob::run()
{
if (m_func != nullptr) {
m_func(m_arg);
}
2012-06-10 16:50:54 +00:00
}