Switch to in-class initializers for TransmitProfileRule (per CppCoreGuidelines C.48)
@@ -41,24 +41,24 @@ namespace ARIASDK_NS_BEGIN
/// <summary>
/// The network cost, as one of the MAT::NetworkCost enumeration values.
/// </summary>
- NetworkCost netCost; // any|unknown|low|high|restricted
+ NetworkCost netCost = NetworkCost_Any; // any|unknown|low|high|restricted
/// <summary>
/// The power state, as one of the MAT::PowerSource enumeration values.
/// </summary>
- PowerSource powerState; // any|unknown|battery|charging
+ PowerSource powerState = PowerSource_Any; // any|unknown|battery|charging
/// <summary>
/// The type of network, as one of the MAT::NetworkType enumeration values.
/// <b>Note:</b> This member is reserved for future use.
/// </summary>
- NetworkType netType; // reserved for future use
+ NetworkType netType = NetworkType_Any; // reserved for future use
/// <summary>
/// The speed of the network.
/// <b>Note:</b> This member is reserved for future use.
/// </summary>
- unsigned netSpeed; // reserved for future use
+ unsigned netSpeed = 0; // reserved for future use
/// <summary>
/// A vector on integers that contain per-priority transmission timers.
@@ -68,12 +68,7 @@ namespace ARIASDK_NS_BEGIN
/// <summary>
/// The TransmitProfileRule structure default constructor.
/// </summary>
- TransmitProfileRule() {
- netCost = NetworkCost_Any;
- netType = NetworkType_Any;
- netSpeed = 0;
- powerState = PowerSource_Any;
- }
+ TransmitProfileRule() noexcept = default;
} TransmitProfileRule;
