Commit graph

121 commits

Author SHA1 Message Date
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
Andrei Alexandrescu
027ae18cab Merge pull request #5175 from wilzbach/style-cast-space
Add a check to enforce space after cast(..) expressions
2017-02-21 20:11:23 -05:00
Jack Stouffer
e656eec40f Added practical example to std.algorithm.iteration.group 2017-02-21 15:40:24 -05: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
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Sebastian Wilzbach
8d5b051235 Provide reference to other common names 2017-02-16 02:57:51 +01:00
Walter Bright
9f77f47cc7 Merge pull request #5046 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2017-01-21 15:45:48 -08:00
Jack Stouffer
fc37e0f750 Merge pull request #4887 from Superstar64/joiner_assign_front
made joiner.front assignable
2017-01-18 16:05:28 -05:00
Dmitry Olshansky
4d19d0ad3a Fix issue 17066 2017-01-17 23:07:56 +01:00
Eduard Staniloiu
3d98191ce9 Fix issue 16970 - Fix deprecations and warnings when compiling Phobos 2016-12-27 15:57:20 +02:00
Sebastian Wilzbach
f903de7bc6 Fix issue 16255 - std.algorithm.iteration.each on opApply doesn't support ref 2016-12-23 23:46:37 +01:00
Andrei Alexandrescu
428217b317 Merge pull request #4961 from edi33416/uniq_consistency
Fix issue 16588 - uniqs BidirectionalRange behavior is inconsistent w…
2016-12-19 14:58:51 -05:00
Eduard Staniloiu
e1c5362995 Add tests for empty range 2016-12-19 20:50:59 +02:00
Eduard Staniloiu
b9d271d52c Remove picking policy 2016-12-19 20:02:11 +02:00
Eduard Staniloiu
a502b2a254 Fix issue 16588 - uniqs BidirectionalRange behavior is inconsistent with its InputRange behavior 2016-12-16 18:05:37 +02:00
Sebastian Wilzbach
cc7f125ed1 Add missing imports to public unittests 2016-12-15 23:23:35 +01:00
Sebastian Wilzbach
b82ae35fd7 Use void for auto function without return statement 2016-12-08 12:32:14 +01:00
Ilya Yaroshenko
b6f03d4b89 Revert "Add new function std.algorithm.iteration : cumulativeSum" 2016-11-10 08:38:43 +02:00
Steven Schveighoffer
c41e41d961 Fix grammar nit 2016-11-08 15:51:40 -05:00
e-y-e
c5df83f912 Tweak unittests 2016-11-07 18:03:47 +00:00
e-y-e
9a64320e00 Fix documentation errors 2016-11-07 17:39:34 +00:00
e-y-e
aa74a62937 Add std.algorithm.iteration : cumulativeSum 2016-11-07 17:39:34 +00:00
Superstar64
0b4b4537a6 made joiner.front assignable 2016-11-05 17:04:37 -04:00
Vladimir Panteleev
d6572c2a44 Fix Issue 16587 - split("", "x") should be ""
This reverts commit b438bf5a06.
2016-10-03 22:30:00 +00:00
Jack Stouffer
67d44e4cdc Remove package wide std.algorithm imports from Phobos 2016-09-22 08:36:14 +01:00
Andrei Alexandrescu
288c21b78b Merge pull request #4775 from NVolcz/patch-2
Removed debug lines from example unittest
2016-09-16 19:28:22 -04:00
Walter Bright
55e5737525 add 'scope' to opApply() parameter 2016-09-14 19:41:41 -07:00
NVolcz
afc7ae9bb3 Removed debug lines from example unittest
The example for ´´´auto joiner(RoR)(RoR r)´´´ includes a scoped debug line. This line is not relevant in an example unittest.
https://dlang.org/phobos/std_algorithm_iteration.html#joiner
2016-09-12 11:22:26 +02:00
Jack Stouffer
c5d537f06e Fix spelling mistake in iteration.d 2016-08-24 15:45:47 -04:00
Sebastian Wilzbach
d7a18dc52e add unittest attributes to std.algorithm.iteration 2016-07-29 12:25:22 +02:00
Ilya Yaroshenko
efe33e3470 fix docs in iteration
`sum` is not precise. Precise algorithms are Python `fsum` and Mir's [`sum!(Summation.precise)`](http://docs.mir.dlang.io/latest/mir_sum.html)
2016-07-26 10:07:42 +02:00
Andrei Alexandrescu
cd68d1a582 Merge pull request #4603 from JackStouffer/cache
Enhanced cache and map to provide length info for their slices
2016-07-15 16:45:30 -04:00
Jack Stouffer
fcb57098d1 Enhanced cache and map to provide length info for their slices 2016-07-14 14:03:25 -04:00
Jack Stouffer
c9222e1ecc Added messages to asserts in std.algorithm.iteration 2016-07-14 13:16:23 -04:00
Steven Schveighoffer
c74537000c Fix all windows cycles 2016-07-08 21:07:15 -04:00
Jack Stouffer
6b22c63c5b Enable long line checks in travis 2016-07-02 01:10:29 -04:00
Jack Stouffer
268fa2538d Add some const and immutable to std.algorithm 2016-07-01 17:11:09 -04:00
Jack Stouffer
ad7dbaa050 Fixed Issue 14485: .front of empty filtered zip range is accessible 2016-06-28 09:48:56 -04:00
Andrei Alexandrescu
e59c06b410 Merge pull request #4431 from wilzbach/document_std_algorithm_test
add external imports to documented unittests in std.algorithm
2016-06-18 06:38:44 -04:00
Andrei Alexandrescu
ac9c93cb9e Merge pull request #4315 from wilzbach/algorithms_private_cleanup
std.algorithm: set accidentally exposed methods to private
2016-06-18 04:27:58 -04:00
Andrei Alexandrescu
7172eda466 Merge pull request #4327 from tsbockman/isPowerOf2
Add `std.math.isPowerOf2()`. Supports floating-point and integers.
2016-06-16 23:09:02 -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
8b60ec24b0 add external imports to documented unittests in std.algorithm 2016-06-15 03:42:28 +02:00
tsbockman
18d1b436e4 Update Phobos to use the new std.math.isPowerOf2() everywhere.
`std.uni` looks like it may depend upon its local `isPowerOf2()` implementation
to return `true` for `0`. Since the semantics are different from the standard
version, I have renamed it to `isPow2OrZero()` to avoid confusion.
2016-06-04 21:19:38 -07:00
Sebastian Wilzbach
0c100a7b5a std.algorithm: set accidentally exposed methods to private 2016-06-04 16:13:07 +02:00
Steven Schveighoffer
e216c10b2c Merge pull request #4383 from JackStouffer/issue16073
Partial Fix for Issue 16073
2016-06-02 14:30:24 -04:00
Jack Stouffer
a818c7e059 [Issue 16073] Fix incorrect uses of random access range primitives in std.algorithm.iteration 2016-06-02 09:31:01 -04:00
Sebastian Wilzbach
ca098c57d2 manual allman brace fixup 2016-05-31 13:07:53 +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