From a60828d6dac4e8139ff7da90f15e863fb1dcff62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sun, 23 Jul 2017 15:04:11 +0200 Subject: [PATCH] Mark more classes as final. --- source/vibe/core/concurrency.d | 2 +- source/vibe/core/connectionpool.d | 2 +- source/vibe/core/taskpool.d | 4 ++-- source/vibe/internal/interfaceproxy.d | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/vibe/core/concurrency.d b/source/vibe/core/concurrency.d index bcb7d0b..60a7dd4 100644 --- a/source/vibe/core/concurrency.d +++ b/source/vibe/core/concurrency.d @@ -1226,7 +1226,7 @@ void prioritySend(ARGS...)(Task task, ARGS args) { std.concurrency.prioritySend( void prioritySend(ARGS...)(Tid tid, ARGS args) { std.concurrency.prioritySend(tid, args); } -package class VibedScheduler : Scheduler { +package final class VibedScheduler : Scheduler { import core.sync.mutex; import vibe.core.core; import vibe.core.sync; diff --git a/source/vibe/core/connectionpool.d b/source/vibe/core/connectionpool.d index bb06a4c..92c6aec 100644 --- a/source/vibe/core/connectionpool.d +++ b/source/vibe/core/connectionpool.d @@ -27,7 +27,7 @@ import vibe.internal.freelistref; reopen it if necessary. The `ConnectionPool` class has no knowledge of the internals of the connection objects. */ -class ConnectionPool(Connection) +final class ConnectionPool(Connection) { private { Connection delegate() @safe m_connectionFactory; diff --git a/source/vibe/core/taskpool.d b/source/vibe/core/taskpool.d index 9d1cd86..72e78c4 100644 --- a/source/vibe/core/taskpool.d +++ b/source/vibe/core/taskpool.d @@ -20,7 +20,7 @@ import std.traits : isFunctionPointer; /** Implements a shared, multi-threaded task pool. */ -shared class TaskPool { +shared final class TaskPool { private { struct State { WorkerThread[] threads; @@ -222,7 +222,7 @@ shared class TaskPool { } } -private class WorkerThread : Thread { +private final class WorkerThread : Thread { private { shared(TaskPool) m_pool; TaskQueue m_queue; diff --git a/source/vibe/internal/interfaceproxy.d b/source/vibe/internal/interfaceproxy.d index 5e1216b..8cfebaa 100644 --- a/source/vibe/internal/interfaceproxy.d +++ b/source/vibe/internal/interfaceproxy.d @@ -10,7 +10,7 @@ InterfaceProxyClass!(I, O) asInterface(I, O)(O obj) if (is(I == interface) && !i InterfaceProxy!I interfaceProxy(I, O)(O o) { return InterfaceProxy!I(o); } -private class InterfaceProxyClass(I, O) : I +private final class InterfaceProxyClass(I, O) : I { import std.meta : AliasSeq; import std.traits : FunctionAttribute, MemberFunctionsTuple, ReturnType, ParameterTypeTuple, functionAttributes;