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

perf(camerasource): Passed parameter by reference

This commit is contained in:
Polshakov Dmitry 2016-04-14 14:42:16 +03:00 committed by Diadlo
parent 25cec623fa
commit 910c41f4fa
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 4 additions and 4 deletions

View File

@ -65,12 +65,12 @@ void CameraSource::open()
open(CameraDevice::getDefaultDeviceName());
}
void CameraSource::open(const QString deviceName)
void CameraSource::open(const QString& deviceName)
{
open(deviceName, VideoMode{0,0,0,0});
}
void CameraSource::open(const QString DeviceName, VideoMode Mode)
void CameraSource::open(const QString& DeviceName, VideoMode Mode)
{
streamBlocker = true;
QMutexLocker l{&biglock};

View File

@ -52,8 +52,8 @@ public:
/// Opens the source for the camera device in argument, in the settings, or the system default
/// If a device is already open, the source will seamlessly switch to the new device
void open();
void open(const QString deviceName);
void open(const QString deviceName, VideoMode mode);
void open(const QString& deviceName);
void open(const QString& deviceName, VideoMode mode);
void close(); ///< Equivalent to opening the source with the video device "none". Stops streaming.
bool isOpen();