diff options
author | Robert Tari <robert@tari.in> | 2021-12-16 13:06:08 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-08 18:30:04 +0100 |
commit | 7f380782f57089b97a04125f18d61da05292d2ba (patch) | |
tree | 598701a52e7dda0954f62ee17432bc337967b8c4 /src/exporter.cpp | |
parent | b7df5a9578ab32ac3c67fc8e0c0490d8bb286fb1 (diff) | |
download | ayatana-indicator-datetime-7f380782f57089b97a04125f18d61da05292d2ba.tar.gz ayatana-indicator-datetime-7f380782f57089b97a04125f18d61da05292d2ba.tar.bz2 ayatana-indicator-datetime-7f380782f57089b97a04125f18d61da05292d2ba.zip |
Fix cppcheck errors/warnings
Diffstat (limited to 'src/exporter.cpp')
-rw-r--r-- | src/exporter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/exporter.cpp b/src/exporter.cpp index ea514c0..41a1583 100644 --- a/src/exporter.cpp +++ b/src/exporter.cpp @@ -1,5 +1,6 @@ /* * Copyright 2013 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 version 3, as published @@ -15,6 +16,7 @@ * * Authors: * Charles Kerr <charles.kerr@canonical.com> + * Robert Tari <robert@tari.in> */ #include <datetime/dbus-shared.h> @@ -37,7 +39,7 @@ class Exporter::Impl { public: - Impl(const std::shared_ptr<Settings>& settings): + explicit Impl(const std::shared_ptr<Settings>& settings): m_settings(settings), m_alarm_props(datetime_alarm_properties_skeleton_new()) { @@ -190,10 +192,10 @@ private: for(auto& menu : m_menus) { const auto path = std::string(BUS_DATETIME_PATH) + "/" + menu->name(); - const auto id = g_dbus_connection_export_menu_model(m_bus, path.c_str(), menu->menu_model(), &error); - if (id) + const auto nId = g_dbus_connection_export_menu_model(m_bus, path.c_str(), menu->menu_model(), &error); + if (nId) { - m_exported_menu_ids.insert(id); + m_exported_menu_ids.insert(nId); } else { |