Skip to content

Commit

Permalink
Add numItems parameter to printCborStream helper: no sink overload.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSmith33 committed Oct 3, 2016
1 parent f780559 commit ae02851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ os:
language: d

d:
- dmd-2.071.0
- dmd-2.071.2
- dmd-2.070.2
- dmd-2.069.2
- dmd-2.068.2
Expand All @@ -17,7 +17,7 @@ d:

matrix:
allow_failures:
- ldc-1.0.0
- d: ldc-1.0.0

env:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions cbor.d
Original file line number Diff line number Diff line change
Expand Up @@ -1229,15 +1229,15 @@ private float halfToFloat(ushort half) @nogc
( half & 0x8000 ) << 16 // sign << ( 31 - 15 )
| ( exp | mant ) << 13 ) // value << ( 23 - 10 )
};
return f.f;
return f.f;
}

/// Outputs textual representation of cbor stream into sink or stdout if not provided.
void printCborStream(string singleIndent=" ", R)(auto ref R input)
void printCborStream(string singleIndent=" ", R)(auto ref R input, ulong numItems = ulong.max)
{
import std.stdio : stdout;
auto writer = stdout.lockingTextWriter;
printCborStream!singleIndent(input, writer);
printCborStream!singleIndent(input, writer, numItems);
}

/// ditto
Expand Down

0 comments on commit ae02851

Please sign in to comment.