Tomoya Tanjo
1a7546cadb
Mark the unittest for std.array.minimallyInitializedArray as @safe
2013-09-15 13:00:06 +09:00
monarch dodra
0b6ceaa5aa
Merge pull request #1561 from tom-tan/fix-unittest-array-assocArray
...
Fix unittest for std.array.assocArray
2013-09-14 13:49:24 -07:00
monarch dodra
b0d11ada76
Merge pull request #1563 from tom-tan/fix-unittest-array-blockAttribute-nDimensions
...
Mark unittests for blockAttribute and nDimensions as @safe, pure, nothrow
2013-09-14 13:48:36 -07:00
monarch dodra
b3fa35ae73
Merge pull request #1566 from tom-tan/fix-array-rangeprimitives-for-array
...
Fix the range primitives for array in std.array
2013-09-14 13:48:18 -07:00
Tomoya Tanjo
ae9ffd7b48
Fix unittest for std.array.overlap
2013-09-14 12:42:20 +09:00
Tomoya Tanjo
1d711cae88
Fix the range primitives for array in std.array
2013-09-14 12:27:15 +09:00
Tomoya Tanjo
5939a04e8c
Fix unittest for std.array.assocArray
2013-09-14 11:30:22 +09:00
Tomoya Tanjo
e0f27b6d53
Change unittest block to version(unittest) block
2013-09-14 11:24:16 +09:00
monarch dodra
67e2f0055b
Merge pull request #1562 from tom-tan/fix-unittest-array-array
...
Fix a unittest for std.array.array
2013-09-11 08:35:55 -07:00
Tomoya Tanjo
d3319ae38d
Use documented unittest for std.array.uninitializedArray
2013-09-11 21:42:29 +09:00
Tomoya Tanjo
ba9052bf00
Fix a unittest for std.array.array
2013-09-11 21:19:48 +09:00
monarch dodra
01a2bdb02e
Merge pull request #1535 from blackwhale/fix-lambda
...
Sidestep issue 10928
2013-09-01 01:13:44 -07:00
monarch dodra
aa3b13ce49
Merge pull request #1328 from 9rnsr/fix10230
...
Issue 10230 - Duplicated buttons for runnable examples
2013-08-31 02:50:17 -07:00
Dmitry Olshansky
8d50d807be
sidestep issue 10928
2013-08-30 22:56:38 +04:00
monarch dodra
9103d642a7
Merge pull request #1425 from tom-tan/safe-array-array
...
Make std.array.array @safe if possible
2013-08-06 08:10:47 -07:00
Tomoya Tanjo
fc3414d18f
Fix for array.array
2013-08-04 12:16:19 +09:00
Tomoya Tanjo
f4002a5a63
Fix array.array
2013-08-03 22:21:37 +09:00
Tomoya Tanjo
9760ee864a
Fix unittests
2013-08-03 20:43:10 +09:00
Tomoya Tanjo
b059f51751
Update unittests
2013-08-03 20:16:46 +09:00
Tomoya Tanjo
f6b41a55eb
Fix array to make it surely safe for some cases
2013-08-03 20:03:01 +09:00
Tomoya Tanjo
1f016bbcc0
Some fixes according to the comments by @ monarchdodra
2013-07-23 23:37:14 +09:00
Tomoya Tanjo
c5218dd33b
Fix the arguments of sameTail and make sameHead and sameTail @safe
2013-07-22 21:48:35 +09:00
Tomoya Tanjo
4581999a3c
Make std.array.array @safe if possible
2013-07-20 17:17:19 +09:00
k-hara
87bd3315db
fix Issue 10230 - Duplicated buttons for runnable examples
2013-07-16 00:45:48 +09:00
k-hara
a4d71338f9
[appender] Mark pointer slicing @trusted (fix for issue 10359)
2013-06-20 11:13:52 +09:00
k-hara
9cdfd6899a
[appender] Determine @trusted operations
2013-06-20 10:54:37 +09:00
k-hara
99d22b80f6
[appender] Accepting qualified buffer is not safe behavior
...
To reduce existing code breaking, mark such construction as @system.
2013-06-20 10:54:35 +09:00
k-hara
41098e3f49
[appender] Reuse ensureAddable for reserve implementation
...
AFAICS, they have mostly same code.
2013-06-20 10:54:33 +09:00
k-hara
ed03c4af01
Fix trivial nitpicks
2013-06-20 10:54:20 +09:00
Denis Shelomovskij
51a5bad3e6
Improve Issue 10220 fix.
...
Improves pull #1329 .
Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=10220
2013-06-05 18:43:47 +04:00
k-hara
924232603a
fix Issue 10220 - array
doesn't work with disabled default construction
2013-06-02 02:32:53 +09:00
k-hara
e2d991b005
Move checkCTFEable to std.exception.assertCTFEable, and use it
2013-06-02 02:32:24 +09:00
Dylan Knutson
5294809f53
fix for calling .array() on ranges in CTFE
2013-05-25 23:46:51 -07:00
k-hara
fa3c481ba7
fix Issue 10122 - Appender
doesn't work with disabled default construction
2013-05-21 00:14:00 +09:00
k-hara
8083744164
[Trivial] fix code style
2013-05-20 22:40:44 +09:00
Ferdinand Majerech
b8d98efd2d
DDoc (minor): array.d: Appender.shrinkTo throws Exception
...
Specified that Exception gets thrown (the previous ddoc didn't make sense).
2013-04-20 15:22:56 +03:00
k-hara
53640bf046
fix Issue 9836 - std.array.popFront does not work with alias this.
...
empty, front, popFront, back, popBack should work with alias this type.
2013-04-05 22:33:05 +09:00
Vladimir Panteleev
0b1f86119a
std.array: Fix inefficient appending of const(char)[] (Issue 9725)
2013-03-15 04:40:14 +00:00
Andrej Mitrovic
92b7d19000
Fixes Issue 4287 - Implement concat-assign operator for Appender.
2013-02-07 18:49:53 +01:00
Andrej Mitrovic
10745625bc
Detab std.array.
2013-02-07 18:49:01 +01:00
Peter Alexander
9d8c78d180
Changed foreach to for to avoid copies + cleanup
2012-12-30 17:15:09 +00:00
Peter Alexander
d24519ee47
More improvements and optimisations to array.join
2012-12-28 17:29:43 +00:00
Peter Alexander
83cf1854db
Fix for non-array separators for non-string RoR.
2012-12-27 17:57:29 +00:00
Peter Alexander
221ea836fa
Convert sep to array for performance/generality.
2012-12-27 16:38:26 +00:00
Peter Alexander
b6c9ffed91
Fix for mismatched string types + added unittests.
2012-12-27 02:06:06 +00:00
Peter Alexander
ceda4e2880
std.array.join refactor.
...
tl;dr: std.array.join was quite complicated: 6 implementation functions, and a few hundred lines of code. Now it is just 2 functions, ~120 lines of code smaller, and within 10% performance of original (faster in some cases).
The original had 6 implementations: 3 joins with a separator, 3 without. For each, those 3 consisted of:
* A general slow version (uses `std.algorithm.joiner` with `appender`).
* A version for a range of arrays where you know the length (pre-allocates the destination array then uses array ops).
* A version for a range of arrays where you don't know the length (uses `appender`).
There's no need for the second version because you can just use appender and `.reserve` the size upfront. Appender already uses array ops when available in its `put` function.
There's also no need for the first function because using `joiner` is slower than just looping through the sub-ranges, appending them. The third function doesn't even use the fact that its operating on a range of arrays, so it can easily be merged with the first and second.
The end result is just one function for join with a separator, and one for a join without. They both use `appender`, and have a static branch that will `.reserve` the required size when the information is available.
2012-12-26 18:46:22 +00:00
Peter Alexander
25abd874d1
Simplified std.array.join with separator.
...
Previously, std.array.join with a separator would check whether it needed to add the separator on each iteration of the loop. With this change, the check is unnecessary because the first element is appended before the loop, then the loop just adds the separator and next element each iteration.
This improves the code significantly in the case of a non-forward RoR because we don't need to know the length anymore. It's simpler, and will be slightly faster.
2012-12-25 19:20:15 +00:00
Dmitry Olshansky
9e35a4d8ee
address review remarks
2012-12-13 20:48:24 +04:00
Dmitry Olshansky
222c803536
re-style and fix indention
2012-12-13 20:41:21 +04:00
Dmitry Olshansky
b7286e7444
generalize countLength
2012-12-13 20:41:20 +04:00