Browse Source

perf(camerasource): Passed parameter by reference

pull/3162/head
Polshakov Dmitry 10 years ago committed by Diadlo
parent
commit
910c41f4fa
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 4
      src/video/camerasource.cpp
  2. 4
      src/video/camerasource.h

4
src/video/camerasource.cpp

@ -65,12 +65,12 @@ void CameraSource::open() @@ -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};

4
src/video/camerasource.h

@ -52,8 +52,8 @@ public: @@ -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();

Loading…
Cancel
Save