Skip to content

Commit 00fa064

Browse files
committed
Upgraded to xtl 0.6.21
1 parent 20a8a89 commit 00fa064

4 files changed

Lines changed: 22 additions & 17 deletions

File tree

.azure-pipelines/azure-pipelines-win.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
conda install cmake==3.14.0 ^
3838
ninja ^
3939
nlohmann_json ^
40-
xtl==0.6.20 ^
40+
xtl==0.6.21 ^
4141
xsimd==7.4.8 ^
4242
python=3.6
4343
conda list

environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ channels:
33
- conda-forge
44
dependencies:
55
- cmake
6-
- xtl=0.6.20
6+
- xtl=0.6.21
77
- xsimd=7.4.8
88
- nlohmann_json

include/xtensor/xnpy.hpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,17 @@ namespace xt
119119
constexpr char no_endian_char = '|';
120120

121121
if(sizeof(T) <= sizeof(char))
122-
return no_endian_char;
122+
{
123+
return no_endian_char;
124+
}
123125

124-
switch(xtl::endianness()) {
125-
case xtl::endian::little_endian:
126+
switch(xtl::endianness())
127+
{
128+
case xtl::endian::little_endian:
126129
return little_endian_char;
127-
case xtl::endian::big_endian:
130+
case xtl::endian::big_endian:
128131
return big_endian_char;
129-
default:
132+
default:
130133
return no_endian_char;
131134
}
132135
}

test/test_xnpy.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@
1717

1818
namespace xt
1919
{
20-
std::string get_load_filename(std::string const& npy_prefix, layout_type lt = layout_type::row_major) {
21-
std::string lts = lt == layout_type::row_major ? "" : "_fortran";
22-
std::string endianness;
23-
switch(xtl::endianness()) {
20+
std::string get_load_filename(std::string const& npy_prefix, layout_type lt = layout_type::row_major)
21+
{
22+
std::string lts = lt == layout_type::row_major ? "" : "_fortran";
23+
std::string endianness;
24+
switch(xtl::endianness())
25+
{
2426
case xtl::endian::big_endian:
25-
endianness = ".be";
26-
break;
27+
endianness = ".be";
28+
break;
2729
case xtl::endian::little_endian:
28-
endianness = ".le";
29-
break;
30-
};
31-
return npy_prefix + lts + endianness + ".npy";
30+
endianness = ".le";
31+
break;
32+
}
33+
return npy_prefix + lts + endianness + ".npy";
3234
}
3335

3436
TEST(xnpy, load)

0 commit comments

Comments
 (0)