Skip to content

Commit 32e5aea

Browse files
Use '()' for clearer operator precedence (#7182)
1 parent 0a11ffa commit 32e5aea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shift.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SEXP shift(SEXP obj, SEXP k, SEXP fill, SEXP type)
4040
SEXP elem = VECTOR_ELT(x, i);
4141
size_t size = RTYPE_SIZEOF(elem);
4242
R_xlen_t xrows = xlength(elem);
43-
if (INHERITS(elem, char_Date) && INHERITS(fill, char_POSIXct) || INHERITS(elem, char_POSIXct) && INHERITS(fill, char_Date)) {
43+
if ((INHERITS(elem, char_Date) && INHERITS(fill, char_POSIXct)) || (INHERITS(elem, char_POSIXct) && INHERITS(fill, char_Date))) {
4444
const char* elem_type = INHERITS(elem, char_Date) ? "Date" : "POSIXct";
4545
const char* fill_type = INHERITS(fill, char_Date) ? "Date" : "POSIXct";
4646
error(_("Filling %s with %s using shift() is unsupported. Please convert fill to %s first."),

0 commit comments

Comments
 (0)