1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: Comply with Clang's Wunused-parameter

This commit is contained in:
Anthony Bilinski 2022-03-15 06:56:41 -07:00
parent 3d7a0d249d
commit 73aa1f3f48
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
3 changed files with 6 additions and 6 deletions

View File

@ -86,7 +86,7 @@ CameraDevice::CameraDevice(const QString& devName_, AVFormatContext* context_)
{ {
} }
CameraDevice* CameraDevice::open(Settings& settings, QString devName, AVDictionary** options) CameraDevice* CameraDevice::open(QString devName, AVDictionary** options)
{ {
openDeviceLock.lock(); openDeviceLock.lock();
AVFormatContext* fctx = nullptr; AVFormatContext* fctx = nullptr;
@ -151,7 +151,7 @@ out:
* @param mode Mode of device to open. * @param mode Mode of device to open.
* @return CameraDevice if the device could be opened, nullptr otherwise. * @return CameraDevice if the device could be opened, nullptr otherwise.
*/ */
CameraDevice* CameraDevice::open(Settings& settings, QString devName, VideoMode mode) CameraDevice* CameraDevice::open(QString devName, VideoMode mode)
{ {
if (!getDefaultInputFormat()) if (!getDefaultInputFormat())
return nullptr; return nullptr;
@ -237,7 +237,7 @@ CameraDevice* CameraDevice::open(Settings& settings, QString devName, VideoMode
std::ignore = mode; std::ignore = mode;
} }
CameraDevice* dev = open(settings, devName, &options); CameraDevice* dev = open(devName, &options);
if (options) { if (options) {
av_dict_free(&options); av_dict_free(&options);
} }

View File

@ -36,7 +36,7 @@ class Settings;
class CameraDevice class CameraDevice
{ {
public: public:
static CameraDevice* open(Settings& settings, QString devName, VideoMode mode = VideoMode()); static CameraDevice* open(QString devName, VideoMode mode = VideoMode());
void open(); void open();
bool close(); bool close();
@ -52,7 +52,7 @@ public:
private: private:
CameraDevice(const QString& devName_, AVFormatContext* context_); CameraDevice(const QString& devName_, AVFormatContext* context_);
static CameraDevice* open(Settings& settings, QString devName, AVDictionary** options); static CameraDevice* open(QString devName, AVDictionary** options);
static bool getDefaultInputFormat(); static bool getDefaultInputFormat();
static QVector<QPair<QString, QString>> getRawDeviceListGeneric(); static QVector<QPair<QString, QString>> getRawDeviceListGeneric();
static QVector<VideoMode> getScreenModes(); static QVector<VideoMode> getScreenModes();

View File

@ -261,7 +261,7 @@ void CameraSource::openDevice()
} }
// We need to create a new CameraDevice // We need to create a new CameraDevice
device = CameraDevice::open(settings, deviceName, mode); device = CameraDevice::open(deviceName, mode);
if (!device) { if (!device) {
qWarning() << "Failed to open device!"; qWarning() << "Failed to open device!";