mirror of
https://github.com/esphome/esphome.git
synced 2026-05-28 13:37:24 +08:00
[packet_transport] Use constexpr for compile-time constants (#14074)
This commit is contained in:
@@ -58,9 +58,9 @@ union FuData {
|
|||||||
float f32;
|
float f32;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint16_t MAGIC_NUMBER = 0x4553;
|
static constexpr uint16_t MAGIC_NUMBER = 0x4553;
|
||||||
static const uint16_t MAGIC_PING = 0x5048;
|
static constexpr uint16_t MAGIC_PING = 0x5048;
|
||||||
static const uint32_t PREF_HASH = 0x45535043;
|
static constexpr uint32_t PREF_HASH = 0x45535043;
|
||||||
enum DataKey {
|
enum DataKey {
|
||||||
ZERO_FILL_KEY,
|
ZERO_FILL_KEY,
|
||||||
DATA_KEY,
|
DATA_KEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user