Browse Source

CallbackDispatcher: 'auto' does not AUTO declare const'ness or pointer/value semantics (use const&)

pull/15/head
heck 3 years ago
parent
commit
68c778ba1b
  1. 10
      src/callback_dispatcher.cc

10
src/callback_dispatcher.cc

@ -59,7 +59,7 @@ namespace pEp {
void CallbackDispatcher::on_startup() void CallbackDispatcher::on_startup()
{ {
for (auto target : targets) { for (const auto& target : targets) {
if (target.on_startup) { if (target.on_startup) {
target.on_startup(); target.on_startup();
} }
@ -68,7 +68,7 @@ namespace pEp {
void CallbackDispatcher::on_shutdown() void CallbackDispatcher::on_shutdown()
{ {
for (auto target : targets) { for (const auto& target : targets) {
if (target.on_shutdown) { if (target.on_shutdown) {
target.on_shutdown(); target.on_shutdown();
} }
@ -100,7 +100,7 @@ namespace pEp {
PassphraseCache::config_next_passphrase(true); PassphraseCache::config_next_passphrase(true);
} }
for (auto target : targets) { for (const auto& target : targets) {
::message *_msg = nullptr; ::message *_msg = nullptr;
if (msg) { if (msg) {
_msg = ::message_dup(msg); _msg = ::message_dup(msg);
@ -120,8 +120,8 @@ namespace pEp {
::pEp_identity *partner, ::pEp_identity *partner,
::sync_handshake_signal signal) ::sync_handshake_signal signal)
{ {
for (auto target : targets) { for (const auto& target : targets) {
if (target.notifyHandshake) { if (target.notifyHandshake != nullptr) {
::pEp_identity *_me = nullptr; ::pEp_identity *_me = nullptr;
if (me) { if (me) {
_me = ::identity_dup(me); _me = ::identity_dup(me);

Loading…
Cancel
Save