Skip to content

Commit 04e09c3

Browse files
authored
Merge pull request #5087 from BBasile/logger-uselessfinal
[style] remove several useless usages of "final"
2 parents 72a2b2e + 63f463b commit 04e09c3

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.dscanner.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ explicitly_annotated_unittests = "disabled"
7777
; Check for sortedness of imports
7878
imports_sortedness = "disabled"
7979
; Check for useless usage of the final attribute
80-
final_attribute_check = "disabled"
80+
final_attribute_check = "enabled"

posix.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ checkwhitespace: $(LIB)
485485

486486
../dscanner:
487487
git clone https://github.com/Hackerpilot/Dscanner ../dscanner
488-
git -C ../dscanner checkout tags/v0.4.0-beta.5
488+
git -C ../dscanner checkout tags/v0.4.0-beta.6
489489
git -C ../dscanner submodule update --init --recursive
490490

491491
../dscanner/dsc: ../dscanner

std/experimental/logger/core.d

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ abstract class Logger
11511151
l.log(1337);
11521152
--------------------
11531153
*/
1154-
final void log(int line = __LINE__, string file = __FILE__,
1154+
void log(int line = __LINE__, string file = __FILE__,
11551155
string funcName = __FUNCTION__,
11561156
string prettyFuncName = __PRETTY_FUNCTION__,
11571157
string moduleName = __MODULE__, A...)(const LogLevel ll,
@@ -1177,7 +1177,7 @@ abstract class Logger
11771177
}
11781178

11791179
/// Ditto
1180-
final void log(T, string moduleName = __MODULE__)(const LogLevel ll,
1180+
void log(T, string moduleName = __MODULE__)(const LogLevel ll,
11811181
lazy bool condition, lazy T args, int line = __LINE__,
11821182
string file = __FILE__, string funcName = __FUNCTION__,
11831183
string prettyFuncName = __PRETTY_FUNCTION__)
@@ -1221,7 +1221,7 @@ abstract class Logger
12211221
s.log(LogLevel.fatal, 1337, "is number");
12221222
--------------------
12231223
*/
1224-
final void log(int line = __LINE__, string file = __FILE__,
1224+
void log(int line = __LINE__, string file = __FILE__,
12251225
string funcName = __FUNCTION__,
12261226
string prettyFuncName = __PRETTY_FUNCTION__,
12271227
string moduleName = __MODULE__, A...)(const LogLevel ll, lazy A args)
@@ -1246,7 +1246,7 @@ abstract class Logger
12461246
}
12471247

12481248
/// Ditto
1249-
final void log(T)(const LogLevel ll, lazy T args, int line = __LINE__,
1249+
void log(T)(const LogLevel ll, lazy T args, int line = __LINE__,
12501250
string file = __FILE__, string funcName = __FUNCTION__,
12511251
string prettyFuncName = __PRETTY_FUNCTION__,
12521252
string moduleName = __MODULE__)
@@ -1290,7 +1290,7 @@ abstract class Logger
12901290
s.log(false, 1337, "is number");
12911291
--------------------
12921292
*/
1293-
final void log(int line = __LINE__, string file = __FILE__,
1293+
void log(int line = __LINE__, string file = __FILE__,
12941294
string funcName = __FUNCTION__,
12951295
string prettyFuncName = __PRETTY_FUNCTION__,
12961296
string moduleName = __MODULE__, A...)(lazy bool condition, lazy A args)
@@ -1316,7 +1316,7 @@ abstract class Logger
13161316
}
13171317

13181318
/// Ditto
1319-
final void log(T)(lazy bool condition, lazy T args, int line = __LINE__,
1319+
void log(T)(lazy bool condition, lazy T args, int line = __LINE__,
13201320
string file = __FILE__, string funcName = __FUNCTION__,
13211321
string prettyFuncName = __PRETTY_FUNCTION__,
13221322
string moduleName = __MODULE__)
@@ -1359,7 +1359,7 @@ abstract class Logger
13591359
s.log(1337, "is number");
13601360
--------------------
13611361
*/
1362-
final void log(int line = __LINE__, string file = __FILE__,
1362+
void log(int line = __LINE__, string file = __FILE__,
13631363
string funcName = __FUNCTION__,
13641364
string prettyFuncName = __PRETTY_FUNCTION__,
13651365
string moduleName = __MODULE__, A...)(lazy A args)
@@ -1387,7 +1387,7 @@ abstract class Logger
13871387
}
13881388

13891389
/// Ditto
1390-
final void log(T)(lazy T arg, int line = __LINE__, string file = __FILE__,
1390+
void log(T)(lazy T arg, int line = __LINE__, string file = __FILE__,
13911391
string funcName = __FUNCTION__,
13921392
string prettyFuncName = __PRETTY_FUNCTION__,
13931393
string moduleName = __MODULE__)
@@ -1433,7 +1433,7 @@ abstract class Logger
14331433
s.logf(LogLevel.fatal, true ,"%d %s", 1337, "is number");
14341434
--------------------
14351435
*/
1436-
final void logf(int line = __LINE__, string file = __FILE__,
1436+
void logf(int line = __LINE__, string file = __FILE__,
14371437
string funcName = __FUNCTION__,
14381438
string prettyFuncName = __PRETTY_FUNCTION__,
14391439
string moduleName = __MODULE__, A...)(const LogLevel ll,
@@ -1479,7 +1479,7 @@ abstract class Logger
14791479
s.logf(LogLevel.fatal, "%d %s", 1337, "is number");
14801480
--------------------
14811481
*/
1482-
final void logf(int line = __LINE__, string file = __FILE__,
1482+
void logf(int line = __LINE__, string file = __FILE__,
14831483
string funcName = __FUNCTION__,
14841484
string prettyFuncName = __PRETTY_FUNCTION__,
14851485
string moduleName = __MODULE__, A...)(const LogLevel ll,
@@ -1526,7 +1526,7 @@ abstract class Logger
15261526
s.logf(true ,"%d %s", 1337, "is number");
15271527
--------------------
15281528
*/
1529-
final void logf(int line = __LINE__, string file = __FILE__,
1529+
void logf(int line = __LINE__, string file = __FILE__,
15301530
string funcName = __FUNCTION__,
15311531
string prettyFuncName = __PRETTY_FUNCTION__,
15321532
string moduleName = __MODULE__, A...)(lazy bool condition,
@@ -1571,7 +1571,7 @@ abstract class Logger
15711571
s.logf("%d %s", 1337, "is number");
15721572
--------------------
15731573
*/
1574-
final void logf(int line = __LINE__, string file = __FILE__,
1574+
void logf(int line = __LINE__, string file = __FILE__,
15751575
string funcName = __FUNCTION__,
15761576
string prettyFuncName = __PRETTY_FUNCTION__,
15771577
string moduleName = __MODULE__, A...)(lazy string msg, lazy A args)

std/regex/internal/bitnfa.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ final class BitMatcher(Char) : Kickstart!(Char)
639639
backward = reverseBitNfa(re, forward.length);
640640
}
641641

642-
final bool search(ref Input!Char r) const
642+
bool search(ref Input!Char r) const
643643
{
644644
auto save = r._index;
645645
bool res = forward.search(r);
@@ -656,15 +656,15 @@ final class BitMatcher(Char) : Kickstart!(Char)
656656
return res;
657657
}
658658

659-
final bool match(ref Input!Char r) const
659+
bool match(ref Input!Char r) const
660660
{
661661
auto save = r._index;
662662
bool res = forward.match(r);
663663
r.reset(save);
664664
return res;
665665
}
666666

667-
final @property bool empty() pure const{ return forward.empty; }
667+
@property bool empty() pure const{ return forward.empty; }
668668
}
669669

670670
version(unittest)

0 commit comments

Comments
 (0)