Skip to content

Commit 6e19a3f

Browse files
Fixed build error in mqtt pub sub sample. (aws#30)
* Fixed build error in mqtt pub sub sample.
1 parent d4371b6 commit 6e19a3f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/aws/crt/Optional.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ namespace Aws
165165
{
166166
if (other.m_value)
167167
{
168-
*m_value = std::forward(*other.m_value);
168+
*m_value = std::forward<U>(*other.m_value);
169169
}
170170
else
171171
{

samples/mqtt_pub_sub/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ int main(int argc, char *argv[])
123123
}
124124

125125
auto clientConfig = Aws::Iot::MqttClientConnectionConfigBuilder(certificatePath.c_str(), keyPath.c_str())
126-
.WithEndpoint(endpoint)
127-
.WithCertificateAuthority(caFile.c_str())
128-
.Build();
126+
.WithEndpoint(endpoint)
127+
.WithCertificateAuthority(caFile.c_str())
128+
.Build();
129129

130130
if (!clientConfig)
131131
{
@@ -197,7 +197,7 @@ int main(int argc, char *argv[])
197197
/*
198198
* Invoked when a disconnect message has completed.
199199
*/
200-
auto onDisconnect = [&](Mqtt::MqttConnection &conn) {
200+
auto onDisconnect = [&](Mqtt::MqttConnection &) {
201201
{
202202
fprintf(stdout, "Disconnect completed\n");
203203
std::lock_guard<std::mutex> lockGuard(mutex);

0 commit comments

Comments
 (0)