From 7f380782f57089b97a04125f18d61da05292d2ba Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 16 Dec 2021 13:06:08 +0100 Subject: Fix cppcheck errors/warnings --- tests/test-formatter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test-formatter.cpp') diff --git a/tests/test-formatter.cpp b/tests/test-formatter.cpp index e63f098..d8c0afb 100644 --- a/tests/test-formatter.cpp +++ b/tests/test-formatter.cpp @@ -1,8 +1,10 @@ /* * Copyright 2013 Canonical Ltd. + * Copyright 2021 Robert Tari * * Authors: * Charles Kerr + * 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 @@ -142,10 +144,9 @@ TEST_F(FormatterFixture, DISABLED_TestDesktopHeader) auto now = DateTime::Local(2020, 10, 31, 18, 30, 59); auto clock = std::make_shared(now); - bool locale_set = false; for(const auto& test_case : test_cases) { - test_case.is_12h ? locale_set = Set12hLocale() : locale_set = Set24hLocale(); + bool locale_set = test_case.is_12h ? Set12hLocale() : Set24hLocale(); DesktopFormatter f(clock, m_settings); m_settings->show_day.set(test_case.show_day); -- cgit v1.2.3