File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -322,15 +322,15 @@ namespace
322
322
{
323
323
#if defined(__GNUC__) || defined(__clang__)
324
324
return __builtin_bswap32 (x);
325
- #endif
326
- #ifdef MSC_VER
325
+ #elif defined(_MSC_VER)
327
326
return _byteswap_ulong (x);
328
- #endif
327
+ #else
329
328
330
329
return (x >> 24 ) |
331
330
((x >> 8 ) & 0x0000FF00 ) |
332
331
((x << 8 ) & 0x00FF0000 ) |
333
332
(x << 24 );
333
+ #endif
334
334
}
335
335
}
336
336
Original file line number Diff line number Diff line change @@ -59,10 +59,9 @@ namespace
59
59
{
60
60
#if defined(__GNUC__) || defined(__clang__)
61
61
return __builtin_bswap64 (x);
62
- #endif
63
- #ifdef _MSC_VER
62
+ #elif _MSC_VER
64
63
return _byteswap_uint64 (x);
65
- #endif
64
+ #else
66
65
67
66
return (x >> 56 ) |
68
67
((x >> 40 ) & 0x000000000000FF00ULL ) |
@@ -72,6 +71,7 @@ namespace
72
71
((x << 24 ) & 0x0000FF0000000000ULL ) |
73
72
((x << 40 ) & 0x00FF000000000000ULL ) |
74
73
(x << 56 );
74
+ #endif
75
75
}
76
76
77
77
Original file line number Diff line number Diff line change @@ -65,15 +65,15 @@ namespace
65
65
{
66
66
#if defined(__GNUC__) || defined(__clang__)
67
67
return __builtin_bswap32 (x);
68
- #endif
69
- #ifdef MSC_VER
68
+ #elif defined(_MSC_VER)
70
69
return _byteswap_ulong (x);
71
- #endif
70
+ #else
72
71
73
72
return (x >> 24 ) |
74
73
((x >> 8 ) & 0x0000FF00 ) |
75
74
((x << 8 ) & 0x00FF0000 ) |
76
75
(x << 24 );
76
+ #endif
77
77
}
78
78
#endif
79
79
}
Original file line number Diff line number Diff line change @@ -61,15 +61,15 @@ namespace
61
61
{
62
62
#if defined(__GNUC__) || defined(__clang__)
63
63
return __builtin_bswap32 (x);
64
- #endif
65
- #ifdef MSC_VER
64
+ #elif defined(_MSC_VER)
66
65
return _byteswap_ulong (x);
67
- #endif
66
+ #else
68
67
69
68
return (x >> 24 ) |
70
69
((x >> 8 ) & 0x0000FF00 ) |
71
70
((x << 8 ) & 0x00FF0000 ) |
72
71
(x << 24 );
72
+ #endif
73
73
}
74
74
}
75
75
Original file line number Diff line number Diff line change @@ -61,10 +61,9 @@ namespace
61
61
{
62
62
#if defined(__GNUC__) || defined(__clang__)
63
63
return __builtin_bswap64 (x);
64
- #endif
65
- #ifdef _MSC_VER
64
+ #elif defined(_MSC_VER)
66
65
return _byteswap_uint64 (x);
67
- #endif
66
+ #else
68
67
69
68
return (x >> 56 ) |
70
69
((x >> 40 ) & 0x000000000000FF00ULL ) |
@@ -74,6 +73,7 @@ namespace
74
73
((x << 24 ) & 0x0000FF0000000000ULL ) |
75
74
((x << 40 ) & 0x00FF000000000000ULL ) |
76
75
(x << 56 );
76
+ #endif
77
77
}
78
78
79
79
You can’t perform that action at this time.
0 commit comments