Skip to content

Commit 71a1bcb

Browse files
authored
Merge pull request #282 from LeeNX/leet-remove-warning-const-char
Cast char* to const char*, resolve warning: ISO C++
2 parents a93b516 + 020a337 commit 71a1bcb

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

BleGamepadConfiguration.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ bool BleGamepadConfiguration::getIncludeSteering() { return _whichSimulationCont
126126
const bool *BleGamepadConfiguration::getWhichSimulationControls() const { return _whichSimulationControls; }
127127
bool BleGamepadConfiguration::getIncludeGyroscope() { return _includeGyroscope; }
128128
bool BleGamepadConfiguration::getIncludeAccelerometer() { return _includeAccelerometer; }
129-
char *BleGamepadConfiguration::getModelNumber(){ return _modelNumber; }
130-
char *BleGamepadConfiguration::getSoftwareRevision(){ return _softwareRevision; }
131-
char *BleGamepadConfiguration::getSerialNumber(){ return _serialNumber; }
132-
char *BleGamepadConfiguration::getFirmwareRevision(){ return _firmwareRevision; }
133-
char *BleGamepadConfiguration::getHardwareRevision(){ return _hardwareRevision; }
129+
const char *BleGamepadConfiguration::getModelNumber(){ return _modelNumber; }
130+
const char *BleGamepadConfiguration::getSoftwareRevision(){ return _softwareRevision; }
131+
const char *BleGamepadConfiguration::getSerialNumber(){ return _serialNumber; }
132+
const char *BleGamepadConfiguration::getFirmwareRevision(){ return _firmwareRevision; }
133+
const char *BleGamepadConfiguration::getHardwareRevision(){ return _hardwareRevision; }
134134
bool BleGamepadConfiguration::getEnableOutputReport(){ return _enableOutputReport; }
135135
bool BleGamepadConfiguration::getEnableNordicUARTService(){ return _enableNordicUARTService; }
136136
uint16_t BleGamepadConfiguration::getOutputReportLength(){ return _outputReportLength; }

BleGamepadConfiguration.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ class BleGamepadConfiguration
232232
int16_t _simulationMax;
233233
int16_t _motionMin;
234234
int16_t _motionMax;
235-
char *_modelNumber;
236-
char *_softwareRevision;
237-
char *_serialNumber;
238-
char *_firmwareRevision;
239-
char *_hardwareRevision;
235+
const char *_modelNumber;
236+
const char *_softwareRevision;
237+
const char *_serialNumber;
238+
const char *_firmwareRevision;
239+
const char *_hardwareRevision;
240240
bool _enableOutputReport;
241241
bool _enableNordicUARTService;
242242
uint16_t _outputReportLength;
@@ -291,11 +291,11 @@ class BleGamepadConfiguration
291291
int16_t getSimulationMax();
292292
int16_t getMotionMin();
293293
int16_t getMotionMax();
294-
char *getModelNumber();
295-
char *getSoftwareRevision();
296-
char *getSerialNumber();
297-
char *getFirmwareRevision();
298-
char *getHardwareRevision();
294+
const char *getModelNumber();
295+
const char *getSoftwareRevision();
296+
const char *getSerialNumber();
297+
const char *getFirmwareRevision();
298+
const char *getHardwareRevision();
299299
bool getEnableOutputReport();
300300
bool getEnableNordicUARTService();
301301
uint16_t getOutputReportLength();

0 commit comments

Comments
 (0)