Skip to content

Commit

Permalink
update deprecated function body
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Dec 1, 2023
1 parent ffabd36 commit 771549f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions source/iot/Mqtt5Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ namespace Aws

Mqtt5ClientBuilder &Mqtt5ClientBuilder::WithAckTimeoutSeconds(uint32_t ackTimeoutSec) noexcept
{
m_options->WithAckTimeoutSec(ackTimeoutSec);
return *this;
return WithAckTimeoutSec(ackTimeoutSec);
}

Mqtt5ClientBuilder &Mqtt5ClientBuilder::WithSdkName(const Crt::String &sdkName)
Expand Down
3 changes: 1 addition & 2 deletions source/mqtt/Mqtt5Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ namespace Aws

Mqtt5ClientOptions &Mqtt5ClientOptions::WithAckTimeoutSeconds(uint32_t ackTimeoutSec) noexcept
{
m_ackTimeoutSec = ackTimeoutSec;
return *this;
return WithAckTimeoutSec(ackTimeoutSec);
}

Mqtt5ClientOptions &Mqtt5ClientOptions::WithAckTimeoutSec(uint32_t ackTimeoutSec) noexcept
Expand Down
13 changes: 6 additions & 7 deletions source/mqtt/Mqtt5Packets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ namespace Aws

const Crt::Optional<uint32_t> &ConnectPacket::getMaximumPacketSizeBytes() const noexcept
{
return m_maximumPacketSizeBytes;
return getMaximumPacketSizeToServer();
}

const Crt::Optional<uint32_t> &ConnectPacket::getMaximumPacketSizeToServer() const noexcept
Expand Down Expand Up @@ -841,7 +841,7 @@ namespace Aws

const Crt::Optional<uint32_t> &ConnAckPacket::getSessionExpiryInterval() const noexcept
{
return m_sessionExpiryIntervalSec;
return getSessionExpiryIntervalSec();
}

const Crt::Optional<uint16_t> &ConnAckPacket::getReceiveMaximum() const noexcept
Expand Down Expand Up @@ -894,7 +894,7 @@ namespace Aws

const Crt::Optional<uint16_t> &ConnAckPacket::getServerKeepAlive() const noexcept
{
return m_serverKeepAliveSec;
return getServerKeepAliveSec();
}

const Crt::Optional<String> &ConnAckPacket::getResponseInformation() const noexcept
Expand Down Expand Up @@ -938,8 +938,7 @@ namespace Aws
}
Subscription &Subscription::WithRetain(bool retain) noexcept
{
m_retainAsPublished = retain;
return *this;
return WithRetainAsPublished(retain);
}
Subscription &Subscription::WithRetainAsPublished(bool retain) noexcept
{
Expand Down Expand Up @@ -1233,7 +1232,7 @@ namespace Aws
return m_receiveMaximumFromServer;
}

uint32_t NegotiatedSettings::getMaximumPacketSizeBytes() const noexcept { return m_maximumPacketSizeBytes; }
uint32_t NegotiatedSettings::getMaximumPacketSizeBytes() const noexcept { return getMaximumPacketSizeToServer(); }

uint32_t NegotiatedSettings::getMaximumPacketSizeToServer() const noexcept
{
Expand All @@ -1252,7 +1251,7 @@ namespace Aws

uint16_t NegotiatedSettings::getServerKeepAliveSec() const noexcept { return m_serverKeepAliveSec; }

uint16_t NegotiatedSettings::getServerKeepAlive() const noexcept { return m_serverKeepAliveSec; }
uint16_t NegotiatedSettings::getServerKeepAlive() const noexcept { return getServerKeepAliveSec(); }

bool NegotiatedSettings::getRetainAvailable() const noexcept { return m_retainAvailable; }

Expand Down

0 comments on commit 771549f

Please sign in to comment.