Commit graph

469 commits

Author SHA1 Message Date
Jack Stouffer
4ce5d44dbb Use underscores for number literals with five or more digits 2017-02-23 09:45:49 -05:00
Sebastian Wilzbach
203755d296 Automatically add spaces to binary operators (>>)
command:

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-23 00:57:47 +01:00
Sebastian Wilzbach
ef7be4b60d Automatically add spaces to binary operators (<<)
command:

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-23 00:57:47 +01:00
Sebastian Wilzbach
d905ef53b1 Automatically add spaces to binary operators (<=)
command:

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-23 00:57:47 +01:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

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-23 00:57:47 +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
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
Jack Stouffer
19e240f136 Merge pull request #5157 from wilzbach/dscanner-builtin-conflict
Dscanner: enable check for conflicts with builtin properties
2017-02-20 13:50:16 -05:00
Sebastian Wilzbach
1552ed5e18 DScanner: check for useless asserts 2017-02-20 15:10:09 +01:00
Sebastian Wilzbach
a58f6cd249 Dscanner: enable check for conflicts with builtin properties 2017-02-20 14:13:57 +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
Nick Treleaven
759da8eec0 swapRanges: Remove redundant constraint tests
hasSwappableElements already tests for isInputRange.
Also fix hasSwappableElements docs.
2017-02-15 17:21:21 +00:00
Jonathan M Davis
130714acdd Move deprecations along. 2017-01-24 03:08:10 -08: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
Martin Nowak
00044d0dd9 Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-01-18 14:09:18 +01:00
Dmitry Olshansky
4d19d0ad3a Fix issue 17066 2017-01-17 23:07:56 +01:00
Jack Stouffer
40bae5d48f Merge pull request #5034 from LemonBoy/correct-cast
Cast a void pointer to char* before subtracting it
2017-01-15 10:49:29 -05:00
LemonBoy
ccfd30019a Cast a void pointer to char* before subtracting it 2017-01-15 15:37:48 +01:00
Martin Nowak
19641412f6 Merge remote-tracking branch 'upstream/master' into stable 2017-01-07 04:00:22 +01:00
Jack Stouffer
83b25ec626 Merge pull request #4970 from RazvanN7/Issue_16959
Fix Issue 16959 - bringToFront fails on char array
2017-01-05 14:14:55 -05:00
RazvanN7
82c30a6882 Issue 16959 - Added doc entry about Unicode behaviour + 1 public unittest 2017-01-05 13:31:46 +02:00
WalterWaldron
40606feece Fix unstable sort documentation.
Noticed this here: https://dlang.org/library/std/algorithm/sorting/sort.html
2016-12-30 03:04:50 -05:00
Sebastian Wilzbach
d1b59d3f2e Fix Issue 16135 - missing std.format import in std.algorithm.comparison 2016-12-30 08:59:25 +01:00
Sebastian Wilzbach
3c0b47ab51 Merge pull request #4979 from WalterWaldron/fix16996
Fix Issue 16996 - std.algorithm.remove with SwapStrategy.unstable rem…
2016-12-29 06:53:20 +01:00
WalterW
99b74fb962 Add @nogc annotated unittest for std.algorithm.remove 2016-12-29 00:08:02 -05:00
WalterW
07d4c37229 Add thorough unittest to std.algorithm.remove 2016-12-29 00:07:54 -05:00
WalterW
424aec1159 Fix Issue 16996 - std.algorithm.remove with SwapStrategy.unstable removes more entries 2016-12-28 23:16:37 -05: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
Sebastian Wilzbach
d8c5437d36 Add new min/maxIndex symbols to booktables 2016-12-21 10:51:16 +01:00
Sebastian Wilzbach
e2025c2c34 Add public examples to std.algorithm 2016-12-20 04:14:10 +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
Per Nordlöw
28153fb3c6 Make merge with bi-directional and have infiniteness and more docs 2016-12-19 09:10:47 +01: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
f3a840144a Merge pull request #4921 from RazvanN7/Issue_8573
Issue 8573 - A simpler Phobos function that returns the index of the …
2016-12-16 16:16:48 +01:00
RazvanN7
d2c7d3761b Issue 8573 - A simpler Phobos function that returns the index of the mix or max item
Issue 8573 - A simpler Phobos function that returns the index of the mix or max item

added some review fixes

fixed an issue with a mutable variable

Applied review feedback

Renamed functions to minIndex and maxIndex + used sizediff_t for return value type

Updated function so that it works optimally even for lazy ranges and algorithms

Reverted to having only copyable elements in ranges

Added more unittests; implemented an array path; fixed documentation

Squashed commits
2016-12-16 11:11:07 +02:00
Sebastian Wilzbach
cc7f125ed1 Add missing imports to public unittests 2016-12-15 23:23:35 +01:00
RazvanN7
0d0ca991a9 Issue 14294 - partialSort should also accept two ranges 2016-12-12 17:18:18 +02:00
Sebastian Wilzbach
c352281212 Enforce Allman style for do { 2016-12-09 17:40:50 +01:00
somzzz
682536d586 fix issue 155421 2016-12-08 13:43:56 -08:00
Sebastian Wilzbach
f0c5a9fad6 Follow-up style fixes for December 2016-12-08 12:32:24 +01:00