diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-08 22:05:22 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-08 22:05:22 +0100 |
commit | b439ad041ff4478453f0bd4e00f55224d653c69b (patch) | |
tree | d04a05b67e5e7d325ca5f18a567906bcaefad6e1 /src/locations-settings.cpp | |
parent | 4e9da1fb0791336cc25b323aed3bbbb20c1b9fb5 (diff) | |
parent | 91af5e2854d40d06515416b4b89eb66b346ebe56 (diff) | |
download | ayatana-indicator-datetime-b439ad041ff4478453f0bd4e00f55224d653c69b.tar.gz ayatana-indicator-datetime-b439ad041ff4478453f0bd4e00f55224d653c69b.tar.bz2 ayatana-indicator-datetime-b439ad041ff4478453f0bd4e00f55224d653c69b.zip |
Merge branch 'tari01-pr/fix-cppcheck-suppressions'
Attributes GH PR #86: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/86
Diffstat (limited to 'src/locations-settings.cpp')
-rw-r--r-- | src/locations-settings.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/locations-settings.cpp b/src/locations-settings.cpp index f1e2b42..2673e66 100644 --- a/src/locations-settings.cpp +++ b/src/locations-settings.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/locations-settings.h> @@ -59,10 +61,10 @@ SettingsLocations::reload() } // add the other detected timezones - for(const auto& zone : m_timezones->timezones.get()) + for(const auto& sZone : m_timezones->timezones.get()) { - gchar * name = get_beautified_timezone_name(zone.c_str(), timezone_name.c_str()); - Location l(zone, name); + gchar * name = get_beautified_timezone_name(sZone.c_str(), timezone_name.c_str()); + Location l(sZone, name); if (std::find(v.begin(), v.end(), l) == v.end()) v.push_back(l); g_free(name); @@ -73,14 +75,14 @@ SettingsLocations::reload() { for(const auto& locstr : m_settings->locations.get()) { - gchar* zone; + gchar* sZone; gchar* name; - split_settings_location(locstr.c_str(), &zone, &name); - Location loc(zone, name); + split_settings_location(locstr.c_str(), &sZone, &name); + Location loc(sZone, name); if (std::find(v.begin(), v.end(), loc) == v.end()) v.push_back(loc); g_free(name); - g_free(zone); + g_free(sZone); } } |