Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f636a5

Browse files
committed
Remove unnecessary conversion of arguments to json array
1 parentcd1d2db commit4f636a5

File tree

6 files changed

+92
-91
lines changed

6 files changed

+92
-91
lines changed

‎include/Array1DTracer.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,57 @@ class Array1DTracer : public Tracer {
1010
}
1111

1212
Array1DTracerset(json array1d) {
13-
addTrace(key,"set",json::array({array1d}));
13+
addTrace(key,"set", {array1d});
1414
return *this;
1515
}
1616

1717
Array1DTracerset() {
18-
addTrace(key,"set",json::array({}));
18+
addTrace(key,"set",{});
1919
return *this;
2020
}
2121

2222
Array1DTracerreset() {
23-
addTrace(key,"reset",json::array({}));
23+
addTrace(key,"reset",{});
2424
return *this;
2525
}
2626

2727
Array1DTracerdelay() {
28-
addTrace(key,"delay",json::array({}));
28+
addTrace(key,"delay",{});
2929
return *this;
3030
}
3131

3232
Array1DTracerpatch(json x, json v) {
33-
addTrace(key,"patch",json::array({x, v}));
33+
addTrace(key,"patch", {x, v});
3434
return *this;
3535
}
3636

3737
Array1DTracerdepatch(json x) {
38-
addTrace(key,"depatch",json::array({x}));
38+
addTrace(key,"depatch", {x});
3939
return *this;
4040
}
4141

4242
Array1DTracerselect(json x) {
43-
addTrace(key,"select",json::array({x}));
43+
addTrace(key,"select", {x});
4444
return *this;
4545
}
4646

4747
Array1DTracerselect(json sx, json ex) {
48-
addTrace(key,"select",json::array({sx, ex}));
48+
addTrace(key,"select", {sx, ex});
4949
return *this;
5050
}
5151

5252
Array1DTracerdeselect(json x) {
53-
addTrace(key,"deselect",json::array({x}));
53+
addTrace(key,"deselect", {x});
5454
return *this;
5555
}
5656

5757
Array1DTracerdeselect(json sx, json ex) {
58-
addTrace(key,"deselect",json::array({sx, ex}));
58+
addTrace(key,"deselect", {sx, ex});
5959
return *this;
6060
}
6161

6262
Array1DTracerchart(ChartTracer chartTracer) {
63-
addTrace(key,"chart",json::array({chartTracer.key}));
63+
addTrace(key,"chart", {chartTracer.key});
6464
return *this;
6565
}
6666
};

‎include/Array2DTracer.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,72 +9,72 @@ class Array2DTracer : public Tracer {
99
}
1010

1111
Array2DTracerset(json array2d) {
12-
addTrace(key,"set",json::array({array2d}));
12+
addTrace(key,"set", {array2d});
1313
return *this;
1414
}
1515

1616
Array2DTracerset() {
17-
addTrace(key,"set",json::array({}));
17+
addTrace(key,"set",{});
1818
return *this;
1919
}
2020

2121
Array2DTracerreset() {
22-
addTrace(key,"reset",json::array({}));
22+
addTrace(key,"reset",{});
2323
return *this;
2424
}
2525

2626
Array2DTracerdelay() {
27-
addTrace(key,"delay",json::array({}));
27+
addTrace(key,"delay",{});
2828
return *this;
2929
}
3030

3131
Array2DTracerpatch(json x, json y, json v) {
32-
addTrace(key,"patch",json::array({x, y, v}));
32+
addTrace(key,"patch", {x, y, v});
3333
return *this;
3434
}
3535

3636
Array2DTracerdepatch(json x, json y) {
37-
addTrace(key,"depatch",json::array({x, y}));
37+
addTrace(key,"depatch", {x, y});
3838
return *this;
3939
}
4040

4141
Array2DTracerselect(json x, json y) {
42-
addTrace(key,"select",json::array({x, y}));
42+
addTrace(key,"select", {x, y});
4343
return *this;
4444
}
4545

4646
Array2DTracerselect(json sx, json sy, json ex, json ey) {
47-
addTrace(key,"select",json::array({sx, sy, ex, ey}));
47+
addTrace(key,"select", {sx, sy, ex, ey});
4848
return *this;
4949
}
5050

5151
Array2DTracerselectRow(json x, json sy, json ey) {
52-
addTrace(key,"selectRow",json::array({x, sy, ey}));
52+
addTrace(key,"selectRow", {x, sy, ey});
5353
return *this;
5454
}
5555

5656
Array2DTracerselectCol(json y, json sx, json ex) {
57-
addTrace(key,"selectCol",json::array({y, sx, ex}));
57+
addTrace(key,"selectCol", {y, sx, ex});
5858
return *this;
5959
}
6060

6161
Array2DTracerdeselect(json x, json y) {
62-
addTrace(key,"deselect",json::array({x, y}));
62+
addTrace(key,"deselect", {x, y});
6363
return *this;
6464
}
6565

6666
Array2DTracerdeselect(json sx, json sy, json ex, json ey) {
67-
addTrace(key,"deselect",json::array({sx, sy, ex, ey}));
67+
addTrace(key,"deselect", {sx, sy, ex, ey});
6868
return *this;
6969
}
7070

7171
Array2DTracerdeselectRow(json x, json sy, json ey) {
72-
addTrace(key,"deselectRow",json::array({x, sy, ey}));
72+
addTrace(key,"deselectRow", {x, sy, ey});
7373
return *this;
7474
}
7575

7676
Array2DTracerdeselectCol(json y, json sx, json ex) {
77-
addTrace(key,"deselectCol",json::array({y, sx, ex}));
77+
addTrace(key,"deselectCol", {y, sx, ex});
7878
return *this;
7979
}
8080
};

‎include/ChartTracer.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,57 +9,57 @@ class ChartTracer : public Tracer {
99
}
1010

1111
ChartTracerset(json array1d) {
12-
addTrace(key,"set",json::array({array1d}));
12+
addTrace(key,"set", {array1d});
1313
return *this;
1414
}
1515

1616
ChartTracerset() {
17-
addTrace(key,"set",json::array({}));
17+
addTrace(key,"set",{});
1818
return *this;
1919
}
2020

2121
ChartTracerreset() {
22-
addTrace(key,"reset",json::array({}));
22+
addTrace(key,"reset",{});
2323
return *this;
2424
}
2525

2626
ChartTracerdelay() {
27-
addTrace(key,"delay",json::array({}));
27+
addTrace(key,"delay",{});
2828
return *this;
2929
}
3030

3131
ChartTracerpatch(json x, json v) {
32-
addTrace(key,"patch",json::array({x, v}));
32+
addTrace(key,"patch", {x, v});
3333
return *this;
3434
}
3535

3636
ChartTracerdepatch(json x) {
37-
addTrace(key,"depatch",json::array({x}));
37+
addTrace(key,"depatch", {x});
3838
return *this;
3939
}
4040

4141
ChartTracerselect(json x) {
42-
addTrace(key,"select",json::array({x}));
42+
addTrace(key,"select", {x});
4343
return *this;
4444
}
4545

4646
ChartTracerselect(json sx, json ex) {
47-
addTrace(key,"select",json::array({sx, ex}));
47+
addTrace(key,"select", {sx, ex});
4848
return *this;
4949
}
5050

5151
ChartTracerdeselect(json x) {
52-
addTrace(key,"deselect",json::array({x}));
52+
addTrace(key,"deselect", {x});
5353
return *this;
5454
}
5555

5656
ChartTracerdeselect(json sx, json ex) {
57-
addTrace(key,"deselect",json::array({sx, ex}));
57+
addTrace(key,"deselect", {sx, ex});
5858
return *this;
5959
}
6060

6161
ChartTracerchart(ChartTracer chartTracer) {
62-
addTrace(key,"chart",json::array({chartTracer.key}));
62+
addTrace(key,"chart", {chartTracer.key});
6363
return *this;
6464
}
6565
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp