@@ -108,7 +108,7 @@ class BaseAdvertisingParams
108
108
mTcpSupported = tcpSupported;
109
109
return *reinterpret_cast <Derived *>(this );
110
110
}
111
- const std::optional<bool > & GetTcpSupported () const { return mTcpSupported ; }
111
+ std::optional<bool > GetTcpSupported () const { return mTcpSupported ; }
112
112
113
113
Derived & SetICDModeToAdvertise (ICDModeAdvertise operatingMode)
114
114
{
@@ -181,14 +181,14 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams<CommissionA
181
181
mVendorId = vendorId;
182
182
return *this ;
183
183
}
184
- const std::optional<uint16_t > & GetVendorId () const { return mVendorId ; }
184
+ std::optional<uint16_t > GetVendorId () const { return mVendorId ; }
185
185
186
186
CommissionAdvertisingParameters & SetProductId (std::optional<uint16_t > productId)
187
187
{
188
188
mProductId = productId;
189
189
return *this ;
190
190
}
191
- const std::optional<uint16_t > & GetProductId () const { return mProductId ; }
191
+ std::optional<uint16_t > GetProductId () const { return mProductId ; }
192
192
193
193
CommissionAdvertisingParameters & SetCommissioningMode (CommissioningMode mode)
194
194
{
@@ -202,7 +202,7 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams<CommissionA
202
202
mDeviceType = deviceType;
203
203
return *this ;
204
204
}
205
- const std::optional<uint32_t > & GetDeviceType () const { return mDeviceType ; }
205
+ std::optional<uint32_t > GetDeviceType () const { return mDeviceType ; }
206
206
207
207
CommissionAdvertisingParameters & SetDeviceName (std::optional<const char *> deviceName)
208
208
{
@@ -263,7 +263,7 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams<CommissionA
263
263
mPairingHint = pairingHint;
264
264
return *this ;
265
265
}
266
- const std::optional<uint16_t > & GetPairingHint () const { return mPairingHint ; }
266
+ std::optional<uint16_t > GetPairingHint () const { return mPairingHint ; }
267
267
268
268
CommissionAdvertisingParameters & SetCommissionAdvertiseMode (CommssionAdvertiseMode mode)
269
269
{
@@ -277,7 +277,7 @@ class CommissionAdvertisingParameters : public BaseAdvertisingParams<CommissionA
277
277
mCommissionerPasscodeSupported = commissionerPasscodeSupported;
278
278
return *this ;
279
279
}
280
- const std::optional<bool > & GetCommissionerPasscodeSupported () const { return mCommissionerPasscodeSupported ; }
280
+ std::optional<bool > GetCommissionerPasscodeSupported () const { return mCommissionerPasscodeSupported ; }
281
281
282
282
private:
283
283
uint8_t mShortDiscriminator = 0 ;
0 commit comments