Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 12a3a74

Browse files
gcbench.conmsg: fix JSONValue constness, use updated identifiers
1 parent 58693d7 commit 12a3a74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

benchmark/gcbench/conmsg.d

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import std.algorithm, std.concurrency, std.conv, std.file, std.json, std.range;
99

10-
JSONValue buildVal(in dchar[] word)
10+
JSONValue buildVal(in dchar[] word) pure
1111
{
1212
JSONValue[string] res;
1313
res["word"] = word.to!string;
@@ -35,27 +35,27 @@ void producer(Tid consumer)
3535

3636
void serialize(in JSONValue val, ref ubyte[] buf)
3737
{
38-
with (JSON_TYPE) switch (val.type)
38+
with (JSONType) switch (val.type)
3939
{
40-
case OBJECT:
40+
case object:
4141
foreach (k, v; val.object)
4242
{
4343
buf ~= cast(ubyte[])k;
4444
serialize(v, buf);
4545
}
4646
break;
4747

48-
case ARRAY:
48+
case array:
4949
foreach (v; val.array)
5050
serialize(v, buf);
5151
break;
5252

53-
case UINTEGER:
53+
case uinteger:
5454
ulong v = val.uinteger;
5555
buf ~= (cast(ubyte*)&v)[0 .. v.sizeof];
5656
break;
5757

58-
case STRING:
58+
case string:
5959
buf ~= cast(ubyte[])val.str;
6060
break;
6161

0 commit comments

Comments
 (0)