Vladimir Panteleev
6caa5fa19a
std.container.rbtree: Add trisect ( #10756 )
...
Useful in case we need >= or <= (instead of > or < or = as provided by
lowerBound/upperBound/equalRange).
Same convention as SortedRange.trisect, except just return a static
array instead of a tuple (as the type is the same).
2025-04-20 07:29:02 +08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues ( #9070 )
...
* Fix UndocumentedDeclarationCheck linting issue
* Fix IfConstraintsIndentCheck linting issue
* Address feedback
* Fix publictests CI
* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Walter Bright
5d2baa46b6
rbtree lambda references stack frame
2022-08-19 06:14:33 -07:00
dkorpel
f7c93036b3
Fix return/inout usage in rbtree
2022-02-16 16:27:04 +00:00
dkorpel
ea76f45494
Use return scope
instead of just return
2021-11-26 17:03:06 +01:00
dkorpel
53cd09c1fb
mark RBNode.left and RBNode.right @trusted
2021-08-09 12:29:07 +02:00
Simon Naarmann
b0b64c3f41
RedBlackTree.empty: const, .front/.back: inout ( #7644 )
...
* RedBlackTree.empty(): Annotated const
RedBlackTree is a template, therefore all other qualifiers
for empty(), length(), and opBinaryRight!"in" will be inferred:
pure, nothrow, @safe, @nogc.
* RedBlackTree.front, .back: inout
2020-09-30 13:29:29 +08:00
Geod24
62c72ca6ff
Follow up review on PR 7441
...
Steven identified a couple mistakes in the massive round of linkification.
Fixing them here.
2020-04-15 02:15:04 +09:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Robert Schadek
09bede3b80
adding assert messages to rbtree
2020-01-27 09:23:07 +00:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
Bernhard Seckinger
79ef683f5c
Fix issue 19626 - RedBlackTree of an enum fails in unittest mode
2019-10-17 20:12:22 +02:00
Walter Bright
fc84e14d54
std.container.rbtree: compile with -dip1000
2019-03-20 12:15:19 -07:00
Walter Bright
fbfd844fd9
rbtree _add need only return a bool
2019-03-19 22:56:01 -07:00
Walter Bright
bc3dd0afda
Even more scope for FormatSpec
2019-03-18 01:28:47 -07:00
Iain Buclaw
fd5facfe04
posix.mak: Enforce whitespace before opening parenthesis for version conditions
2018-09-22 16:57:24 +02:00
Nathan Sashihara
9f42f1f686
Simplify newly-added RedBlackTree.toHash
2018-09-01 14:33:41 -04:00
Vlad Vitan
e61f897381
Fix Issue 18683 - no toHash in rbtree
2018-09-01 14:08:33 -04:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00
Sebastian Wilzbach
42894784dd
Markdownify Phobos
...
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
viktor
a3f8992766
Fix issue 18634 - support for delegate comparators in rbtree
...
RedBlackTree.opEquals() was preventing the use of delegates by
explicitly forcing the equal() check to go through a function.
2018-03-20 00:38:06 +02:00
Jack Stouffer
663b5b9278
Revert addition of StdUnittest
2018-02-20 13:32:32 -05:00
Jack Stouffer
18cbb29b04
Replaced version(unittest) blocks with version(StdUnittest)
2018-02-01 19:56:59 -05:00
RazvanN7
281fe177ac
Fix erroneous imports
2018-01-22 16:37:22 +02:00
Jack Stouffer
dc291a16e4
Changed all instances of FormatSpec to const ref
2018-01-04 10:05:16 -05:00
Sebastian Wilzbach
df6365092a
Replace body
keyword with its replacement: do
...
Automatic replacement with
sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Andrei Alexandrescu
1a08d2a8d6
Convert section labels to title case
2017-07-12 15:19:57 -04:00
anonymous
29c7f36df5
fix issue 17519 - RedBlackTree doesn't like const/immutable elements
2017-06-18 11:35:00 +03:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
...
This reverts commit 998ad51fd7
.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7
Sort selective imports
2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d
Sort imports
2017-06-12 07:54:38 +02:00
Jack Stouffer
e554764c01
Merge pull request #5216 from wilzbach/unluckily-phobos
...
Replace LUCKY links with actual links
2017-03-01 15:17:19 -05:00
Sebastian Wilzbach
3817d6f37d
Check public functions for public examples ( #4998 )
...
Check public functions for public examples
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-03-01 15:49:15 +01:00
Sebastian Wilzbach
d548e8830a
Replace LUCKY links with actual links
2017-02-28 23:46:54 +01:00
Andrei Alexandrescu
30724e67d9
Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
...
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686
DScanner: automatially set all unattributed unittests to @safe or @system
2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3
Automatically set the range style from a..b -> a .. b
...
Commands:
sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595
Unify Phobos by ensuring there's always a space after cast(...)
...
Command:
sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
87dec58a41
DStyle: Constraints on declarations should have the same indentation level
2017-02-17 07:36:23 +01:00
Basile Burg
17cea5abdc
style fix - remove wrong usages of the final attribute
2017-01-16 21:00:13 +01:00
Tomoya Tanjo
242a4959d4
Make std.container.rbtree.RedBlackTree._add @safe
2016-11-21 06:22:45 +09:00
Jack Stouffer
f82611ad19
Remove package wide std.algorithm imports from std/container/rbtree.d
2016-09-20 11:01:28 +01:00
Jack Stouffer
e51a044c19
Fixed local imports in std.container.rbtree
2016-06-30 17:54:13 -04:00
Martin Nowak
f24567b1ed
fix spacing after if
2016-06-18 16:58:22 +02:00
Andrei Alexandrescu
81d132f39a
Merge pull request #4381 from MartinNowak/merge_stable
...
Merge remote-tracking branch 'upstream/stable' into merge_stable
2016-06-18 08:31:42 -04:00
Sebastian Wilzbach
ec47ac4224
Remove the WEB macro in favor of HTTP
...
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
1d34a121e9
apply all-man braces in Phobos
...
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Martin Nowak
82a147765a
Merge remote-tracking branch 'upstream/stable' into merge_stable
2016-05-29 23:56:51 +02:00
Sebastian Wilzbach
2dfbc51f17
Standardize whitespace after imports
...
Unified with:
sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
764caefa36
XREF -> REF (sed)
...
Done by:
(find . -type f -name "*.d" -print0; \
find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00