Skip to content

Commit ea3cd84

Browse files
Make default values const expressions
Co-authored-by: Andrea Gilardoni <[email protected]>
1 parent 165b2d4 commit ea3cd84

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ArduinoIoTCloudTCP.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
/******************************************************************************
4848
CONSTANTS
4949
******************************************************************************/
50-
static char const DEFAULT_BROKER_ADDRESS[] = "iot.arduino.cc";
51-
static uint16_t const DEFAULT_BROKER_PORT_SECURE_AUTH = 8885;
52-
static uint16_t const DEPRECATED_BROKER_PORT_SECURE_AUTH = 8883;
53-
static uint8_t const DEPRECATED_BROKER_AUTHORITY_KEY_IDENTIFIER[] = {
50+
static constexpr char DEFAULT_BROKER_ADDRESS[] = "iot.arduino.cc";
51+
static constexpr uint16_t DEFAULT_BROKER_PORT_SECURE_AUTH = 8885;
52+
static constexpr uint16_t DEPRECATED_BROKER_PORT_SECURE_AUTH = 8883;
53+
static constexpr uint8_t DEPRECATED_BROKER_AUTHORITY_KEY_IDENTIFIER[] = {
5454
0x5b, 0x3e, 0x2a, 0x6b, 0x8e, 0xc9, 0xb0, 0x1a, 0xa8, 0x54,
5555
0xe6, 0x36, 0x9b, 0x8c, 0x09, 0xf9, 0xfc, 0xe1, 0xb9, 0x80 };
56-
static uint16_t const DEFAULT_BROKER_PORT_USER_PASS_AUTH = 8884;
57-
static uint16_t const DEFAULT_BROKER_PORT_AUTO = 0;
56+
static constexpr uint16_t DEFAULT_BROKER_PORT_USER_PASS_AUTH = 8884;
57+
static constexpr uint16_t DEFAULT_BROKER_PORT_AUTO = 0;
5858

5959
/******************************************************************************
6060
* TYPEDEF

0 commit comments

Comments
 (0)