diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2016-06-14 15:02:36 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2016-07-19 12:04:56 +0000 |
commit | 18b365e3b795862e12e5befdff30b2dd0fe8b875 (patch) | |
tree | a35f1b4c2261ff8230dde0d0d639f5286b278eab /src/bluetooth | |
parent | 20949d791463e571bd3a8549933b5b91019f754f (diff) |
WinRT: use constrefs for ComPtr parameters where applicable
Change-Id: Ic4ba77d86f11e984ba66929006df183d227fccce
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/bluetooth')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_winrt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_winrt.cpp b/src/bluetooth/qlowenergycontroller_winrt.cpp index d7a90881..7db1213e 100644 --- a/src/bluetooth/qlowenergycontroller_winrt.cpp +++ b/src/bluetooth/qlowenergycontroller_winrt.cpp @@ -66,7 +66,7 @@ typedef ITypedEventHandler<BluetoothLEDevice *, IInspectable *> StatusHandler; Q_DECLARE_LOGGING_CATEGORY(QT_BT_WINRT) -static QVector<QBluetoothUuid> getIncludedServiceIds(ComPtr<IGattDeviceService> service) +static QVector<QBluetoothUuid> getIncludedServiceIds(const ComPtr<IGattDeviceService> &service) { QVector<QBluetoothUuid> result; ComPtr<IGattDeviceService2> service2; @@ -93,7 +93,7 @@ static QVector<QBluetoothUuid> getIncludedServiceIds(ComPtr<IGattDeviceService> return result; } -static QByteArray byteArrayFromBuffer(ComPtr<IBuffer> buffer, bool isWCharString = false) +static QByteArray byteArrayFromBuffer(const ComPtr<IBuffer> &buffer, bool isWCharString = false) { ComPtr<Windows::Storage::Streams::IBufferByteAccess> byteAccess; HRESULT hr = buffer.As(&byteAccess); @@ -111,7 +111,7 @@ static QByteArray byteArrayFromBuffer(ComPtr<IBuffer> buffer, bool isWCharString return QByteArray(data, size); } -static QByteArray byteArrayFromGattResult(ComPtr<IGattReadResult> gattResult, bool isWCharString = false) +static QByteArray byteArrayFromGattResult(const ComPtr<IGattReadResult> &gattResult, bool isWCharString = false) { ComPtr<ABI::Windows::Storage::Streams::IBuffer> buffer; HRESULT hr; @@ -124,7 +124,7 @@ class QWinRTLowEnergyServiceHandler : public QObject { Q_OBJECT public: - QWinRTLowEnergyServiceHandler(const QBluetoothUuid &service, ComPtr<IGattDeviceService2> deviceService) + QWinRTLowEnergyServiceHandler(const QBluetoothUuid &service, const ComPtr<IGattDeviceService2> &deviceService) : mService(service) , mDeviceService(deviceService) { |