Skip to content

Commit 91fac8c

Browse files
MiloszKosobuckiKDABMiKom
authored andcommitted
Move some static stuff to anonymous namespace
To silence the linter and to have proper linkage.
1 parent 3199eee commit 91fac8c

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/KDFoundation/platform/win32/win32_platform_timer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919

2020
using namespace KDFoundation;
2121

22+
namespace {
2223
inline Win32PlatformEventLoop *eventLoop()
2324
{
2425
return static_cast<Win32PlatformEventLoop *>(CoreApplication::instance()->eventLoop());
2526
}
27+
} // namespace
2628

2729
Win32PlatformTimer::Win32PlatformTimer(Timer *timer)
2830
: m_timer(timer)

tests/auto/foundation/core_application/tst_core_application.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ TEST_CASE("Event handling")
189189
}
190190
}
191191

192+
namespace {
192193
/// macOS on GitHub runners is super slow and timeouts
193194
template<typename T>
194195
inline T adjustTimeout(T timeout)
@@ -200,6 +201,7 @@ inline T adjustTimeout(T timeout)
200201

201202
return timeout;
202203
}
204+
} // namespace
203205

204206
TEST_CASE("Timer handling" * doctest::timeout(120))
205207
{

tests/auto/foundation/event_queue/tst_event_queue.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static_assert(!std::is_copy_assignable<EventQueue>{});
2828
static_assert(!std::is_move_constructible<EventQueue>{});
2929
static_assert(!std::is_move_assignable<EventQueue>{});
3030

31+
namespace {
3132
class MyEvent : public Event
3233
{
3334
public:
@@ -63,6 +64,7 @@ void populateEventQueueWithNEvents(EventQueue &eventQueue, int n, std::vector<Pa
6364
eventQueue.push(target, std::move(ev));
6465
}
6566
}
67+
} // namespace
6668

6769
TEST_CASE("Single-threaded use")
6870
{

0 commit comments

Comments
 (0)