Skip to content

Commit b534e5e

Browse files
committed
moved variant
1 parent 2fd250d commit b534e5e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/MQTTClient.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,6 @@ void MQTTClient::setCleanSession(bool _cleanSession) { this->cleanSession = _cle
246246

247247
void MQTTClient::setTimeout(int _timeout) { this->timeout = _timeout; }
248248

249-
void MQTTClient::setOptions(int _keepAlive, bool _cleanSession, int _timeout) {
250-
this->setKeepAlive(_keepAlive);
251-
this->setCleanSession(_cleanSession);
252-
this->setTimeout(_timeout);
253-
}
254-
255249
bool MQTTClient::publish(const char topic[], const char payload[], int length, bool retained, int qos) {
256250
// return immediately if not connected
257251
if (!this->connected()) {

src/MQTTClient.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ class MQTTClient {
9494
void setKeepAlive(int keepAlive);
9595
void setCleanSession(bool cleanSession);
9696
void setTimeout(int timeout);
97-
void setOptions(int keepAlive, bool cleanSession, int timeout);
97+
98+
void setOptions(int _keepAlive, bool _cleanSession, int _timeout) {
99+
this->setKeepAlive(_keepAlive);
100+
this->setCleanSession(_cleanSession);
101+
this->setTimeout(_timeout);
102+
}
98103

99104
bool connect(const char clientId[], bool skip = false) { return this->connect(clientId, nullptr, nullptr, skip); }
100105
bool connect(const char clientId[], const char username[], bool skip = false) {

0 commit comments

Comments
 (0)