Skip to content

Commit c3b8f1d

Browse files
committed
Add more parentheses
1 parent df695e3 commit c3b8f1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jsrc/conversions.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ jtbcvt(J jt, C mode, array w) -> array {
596596
}
597597
}
598598
// for all numerics, try Boolean/int/float in order, stopping when we find one that holds the data
599-
if (((mode & 1) != 0) || ((AT(w) & XNUM + RAT) == 0)) { // if we are not stopping at XNUM/RAT
599+
if (((mode & 1) != 0) || ((AT(w) & (XNUM + RAT)) == 0)) { // if we are not stopping at XNUM/RAT
600600
// To avoid a needless copy, suppress conversion to B01 if type is B01, to INT if type is INT, etc
601601
// set the NOFUZZ flag in jt to insist on an exact match so we won't lose precision
602602
array y = nullptr;
@@ -641,7 +641,7 @@ auto
641641
jtcvt0(J jt, array w) -> array {
642642
auto const t = AT(w);
643643
auto const n = (t & CMPX) != 0 ? 2 * AN(w) : AN(w);
644-
if ((n != 0) && ((t & FL + CMPX) != 0)) {
644+
if ((n != 0) && ((t & (FL + CMPX)) != 0)) {
645645
auto *u = pointer_to_values<double>(w);
646646
std::transform(u, u + n, u, [](auto v) { return v == 0.0 ? 0.0 : v; });
647647
}
@@ -651,7 +651,7 @@ jtcvt0(J jt, array w) -> array {
651651
auto
652652
jtxco1(J jt, array w) -> array {
653653
ASSERT(AT(w) & DENSE, EVNONCE);
654-
return jtcvt(jt, AT(w) & B01 + INT + XNUM ? XNUM : RAT, w);
654+
return jtcvt(jt, AT(w) & (B01 + INT + XNUM) ? XNUM : RAT, w);
655655
}
656656

657657
auto

0 commit comments

Comments
 (0)