diff options
author | Robert Tari <robert@tari.in> | 2021-12-09 12:00:39 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-12-09 12:03:07 +0100 |
commit | f696e54c767f4971f81237f8e4234289aa3c1b01 (patch) | |
tree | 6e48a65257a071273e7f30b4098aa807e04bc13f /tests/notifications-mock.h | |
parent | 09dde5270d94be7ec55a4ede3ca4007be097b343 (diff) | |
download | ayatana-indicator-sound-f696e54c767f4971f81237f8e4234289aa3c1b01.tar.gz ayatana-indicator-sound-f696e54c767f4971f81237f8e4234289aa3c1b01.tar.bz2 ayatana-indicator-sound-f696e54c767f4971f81237f8e4234289aa3c1b01.zip |
Fix cppcheck warnings
Diffstat (limited to 'tests/notifications-mock.h')
-rw-r--r-- | tests/notifications-mock.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/notifications-mock.h b/tests/notifications-mock.h index 190aa0d..49b2e66 100644 --- a/tests/notifications-mock.h +++ b/tests/notifications-mock.h @@ -1,5 +1,6 @@ /* * Copyright 2015 Canonical Ltd. + * Copyright 2021 Robert Tari * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,7 @@ class NotificationsMock DbusTestDbusMockObject * baseobj = nullptr; public: - NotificationsMock (std::vector<std::string> capabilities = {"actions", "body", "body-markup", "icon-static", "image/svg+xml", "x-canonical-private-synchronous", "x-canonical-append", "x-canonical-private-icon-only", "x-canonical-truncation", "private-synchronous", "append", "private-icon-only", "truncation"}) { + NotificationsMock (const std::vector<std::string>& capabilities = {"actions", "body", "body-markup", "icon-static", "image/svg+xml", "x-canonical-private-synchronous", "x-canonical-append", "x-canonical-private-icon-only", "x-canonical-truncation", "private-synchronous", "append", "private-icon-only", "truncation"}) { mock = dbus_test_dbus_mock_new("org.freedesktop.Notifications"); dbus_test_task_set_bus(DBUS_TEST_TASK(mock), DBUS_TEST_SERVICE_BUS_SESSION); dbus_test_task_set_name(DBUS_TEST_TASK(mock), "Notify"); @@ -64,7 +65,7 @@ class NotificationsMock std::string vector2py (std::vector<std::string> vect) { std::string retval("[ "); - std::for_each(vect.begin(), vect.end() - 1, [&retval](std::string entry) { + std::for_each(vect.begin(), vect.end() - 1, [&retval](const std::string& entry) { retval += "'"; retval += entry; retval += "', "; |