Skip to content

Commit 8e7936d

Browse files
committed
Nordic BLE: Improve return of nRF5xn::getGap.
Return the derived type instead of the abstract one. This is legal as C++ supports covariant returns.
1 parent ed9a1f1 commit 8e7936d

File tree

2 files changed

+2
-2
lines changed
  • features/FEATURE_BLE/targets/TARGET_NORDIC

2 files changed

+2
-2
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF51/source/nRF5xn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class nRF5xn : public BLEInstanceBase
5555
* always needed in a BLE application. Therefore it is allocated
5656
* statically.
5757
*/
58-
virtual Gap &getGap() {
58+
virtual nRF5xGap &getGap() {
5959
return gapInstance;
6060
};
6161

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class nRF5xn : public BLEInstanceBase
5454
* always needed in a BLE application. Therefore it is allocated
5555
* statically.
5656
*/
57-
virtual Gap &getGap() {
57+
virtual nRF5xGap &getGap() {
5858
return gapInstance;
5959
};
6060

0 commit comments

Comments
 (0)