summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channel.cpp4
-rw-r--r--src/identity.cpp2
-rw-r--r--src/message.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/channel.cpp b/src/channel.cpp
index b13a71e..787fb08 100644
--- a/src/channel.cpp
+++ b/src/channel.cpp
@@ -14,7 +14,7 @@ Ref ChannelRequestData::store(const Storage & st) const
{
vector<Record::Item> items;
- for (const auto p : peers)
+ for (const auto & p : peers)
items.emplace_back("peer", p);
items.emplace_back("enc", "aes-128-gcm");
items.emplace_back("key", key);
@@ -94,7 +94,7 @@ Ref Channel::store(const Storage & st) const
{
vector<Record::Item> items;
- for (const auto p : peers)
+ for (const auto & p : peers)
items.emplace_back("peer", p);
items.emplace_back("enc", "aes-128-gcm");
items.emplace_back("key", key);
diff --git a/src/identity.cpp b/src/identity.cpp
index fe4cf53..374a872 100644
--- a/src/identity.cpp
+++ b/src/identity.cpp
@@ -177,7 +177,7 @@ Ref IdentityData::store(const Storage & st) const
{
vector<Record::Item> items;
- for (const auto p : prev)
+ for (const auto & p : prev)
items.emplace_back("SPREV", p.ref());
if (name)
items.emplace_back("name", *name);
diff --git a/src/message.cpp b/src/message.cpp
index f8e0d96..eb1212c 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -73,7 +73,7 @@ Ref DirectMessageData::store(const Storage & st) const
{
vector<Record::Item> items;
- for (const auto prev : prev)
+ for (const auto & prev : prev)
items.emplace_back("PREV", prev.ref());
if (from)
items.emplace_back("from", from->ref().value());