Skip to content

Commit 6c12f90

Browse files
committed
unify whitespaces and indentations
1 parent 8841d42 commit 6c12f90

29 files changed

+291
-334
lines changed

+nix/DataType.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@
1717
end
1818

1919
end
20-

+nix/Entity.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ function delete(obj)
2929
end
3030

3131
end
32-

+nix/FileMode.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
end
99

1010
end
11-

+nix/NamedEntity.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@
1515
end
1616

1717
end
18-

src/nixblock.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
namespace nixblock {
1212

13-
mxArray *describe(const nix::Block &block)
14-
{
13+
mxArray *describe(const nix::Block &block) {
1514
struct_builder sb({ 1 }, { "id", "type", "name", "definition" });
1615

1716
sb.set(block.id());
@@ -22,8 +21,7 @@ namespace nixblock {
2221
return sb.array();
2322
}
2423

25-
void create_data_array(const extractor &input, infusor &output)
26-
{
24+
void create_data_array(const extractor &input, infusor &output) {
2725
nix::Block block = input.entity<nix::Block>(1);
2826

2927
std::string name = input.str(2);
@@ -35,8 +33,7 @@ namespace nixblock {
3533
output.set(0, dt);
3634
}
3735

38-
void create_multi_tag(const extractor &input, infusor &output)
39-
{
36+
void create_multi_tag(const extractor &input, infusor &output) {
4037
nix::Block block = input.entity<nix::Block>(1);
4138
std::string name = input.str(2);
4239
std::string type = input.str(3);
@@ -46,8 +43,7 @@ namespace nixblock {
4643
output.set(0, mTag);
4744
}
4845

49-
void create_group(const extractor &input, infusor &output)
50-
{
46+
void create_group(const extractor &input, infusor &output) {
5147
nix::Block block = input.entity<nix::Block>(1);
5248
std::string name = input.str(2);
5349
std::string type = input.str(3);

src/nixblock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ namespace nixblock {
1515

1616
} // namespace nixblock
1717

18-
#endif
18+
#endif

src/nixdataarray.cc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
namespace nixdataarray {
1313

14-
mxArray *describe(const nix::DataArray &da)
15-
{
14+
mxArray *describe(const nix::DataArray &da) {
1615
struct_builder sb({ 1 }, { "id", "type", "name", "definition", "label",
1716
"shape", "unit", "polynom_coefficients" });
1817

@@ -28,27 +27,23 @@ namespace nixdataarray {
2827
return sb.array();
2928
}
3029

31-
void add_source(const extractor &input, infusor &output)
32-
{
30+
void add_source(const extractor &input, infusor &output) {
3331
nix::DataArray currObj = input.entity<nix::DataArray>(1);
3432
currObj.addSource(input.str(2));
3533
}
3634

37-
void remove_source(const extractor &input, infusor &output)
38-
{
35+
void remove_source(const extractor &input, infusor &output) {
3936
nix::DataArray currObj = input.entity<nix::DataArray>(1);
4037
output.set(0, currObj.removeSource(input.str(2)));
4138
}
4239

43-
void read_all(const extractor &input, infusor &output)
44-
{
40+
void read_all(const extractor &input, infusor &output) {
4541
nix::DataArray da = input.entity<nix::DataArray>(1);
4642
mxArray *data = make_mx_array_from_ds(da);
4743
output.set(0, data);
4844
}
4945

50-
void write_all(const extractor &input, infusor &output)
51-
{
46+
void write_all(const extractor &input, infusor &output) {
5247
nix::DataArray da = input.entity<nix::DataArray>(1);
5348
nix::DataType dtype = input.dtype(2);
5449

src/nixfeature.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010

1111
namespace nixfeature {
1212

13-
mxArray *describe(const nix::Feature &feat)
14-
{
13+
mxArray *describe(const nix::Feature &feat) {
1514
struct_builder sb({ 1 }, { "id", "linkType" });
1615
sb.set(feat.id());
1716
sb.set(feat.linkType());
1817
return sb.array();
1918
}
2019

21-
void set_link_type(const extractor &input, infusor &output)
22-
{
20+
void set_link_type(const extractor &input, infusor &output) {
2321
nix::Feature feat = input.entity<nix::Feature>(1);
2422

2523
feat.linkType(input.ltype(2));

src/nixfile.cc

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,32 @@
1010

1111
namespace nixfile {
1212

13-
void open(const extractor &input, infusor &output)
14-
{
15-
std::string name = input.str(1);
16-
uint8_t omode = input.num<uint8_t>(2);
17-
nix::FileMode mode;
18-
19-
switch (omode) {
20-
case 0: mode = nix::FileMode::ReadOnly; break;
21-
case 1: mode = nix::FileMode::ReadWrite; break;
22-
case 2: mode = nix::FileMode::Overwrite; break;
23-
default: throw std::invalid_argument("unkown open mode");
13+
void open(const extractor &input, infusor &output) {
14+
std::string name = input.str(1);
15+
uint8_t omode = input.num<uint8_t>(2);
16+
nix::FileMode mode;
17+
18+
switch (omode) {
19+
case 0: mode = nix::FileMode::ReadOnly; break;
20+
case 1: mode = nix::FileMode::ReadWrite; break;
21+
case 2: mode = nix::FileMode::Overwrite; break;
22+
default: throw std::invalid_argument("unkown open mode");
23+
}
24+
25+
nix::File fn = nix::File::open(name, mode);
26+
handle h = handle(fn);
27+
28+
output.set(0, h);
2429
}
2530

26-
nix::File fn = nix::File::open(name, mode);
27-
handle h = handle(fn);
28-
29-
output.set(0, h);
30-
}
31-
32-
mxArray *describe(const nix::File &fd) {
33-
struct_builder sb({ 1 }, { "format", "version", "location", "createdAt", "updatedAt" });
34-
sb.set(fd.format());
35-
sb.set(fd.version());
36-
sb.set(fd.location());
37-
sb.set(static_cast<uint64_t>(fd.createdAt()));
38-
sb.set(static_cast<uint64_t>(fd.updatedAt()));
39-
return sb.array();
40-
}
31+
mxArray *describe(const nix::File &fd) {
32+
struct_builder sb({ 1 }, { "format", "version", "location", "createdAt", "updatedAt" });
33+
sb.set(fd.format());
34+
sb.set(fd.version());
35+
sb.set(fd.location());
36+
sb.set(static_cast<uint64_t>(fd.createdAt()));
37+
sb.set(static_cast<uint64_t>(fd.updatedAt()));
38+
return sb.array();
39+
}
4140

4241
} // namespace nixfile

src/nixfile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ mxArray *describe(const nix::File &f);
1111

1212
} // namespace nixfile
1313

14-
#endif
14+
#endif

0 commit comments

Comments
 (0)