Skip to content

Commit cdf6dc5

Browse files
authored
Fix operator precedence warning for right shift and bitwise AND (#5875)
1 parent b3d928e commit cdf6dc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stl/src/_tolower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Tolower(int c, const _Ctypevec* ploc)
7272

7373
// convert int c to multibyte string
7474
if (ploc == nullptr ? _cpp_isleadbyte((c >> 8) & 0xff) : (ploc->_Table[(c >> 8) & 0xff] & _LEADBYTE) != 0) {
75-
inbuffer[0] = (c >> 8 & 0xff);
75+
inbuffer[0] = ((c >> 8) & 0xff);
7676
inbuffer[1] = static_cast<unsigned char>(c);
7777
inbuffer[2] = 0;
7878
size = 2;

stl/src/_toupper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ _CRTIMP2_PURE int __CLRCALL_PURE_OR_CDECL _Toupper(int c, const _Ctypevec* ploc)
7171

7272
// convert int c to multibyte string
7373
if (ploc == nullptr ? _cpp_isleadbyte((c >> 8) & 0xff) : (ploc->_Table[(c >> 8) & 0xff] & _LEADBYTE) != 0) {
74-
inbuffer[0] = (c >> 8 & 0xff);
74+
inbuffer[0] = ((c >> 8) & 0xff);
7575
inbuffer[1] = static_cast<unsigned char>(c);
7676
inbuffer[2] = 0;
7777
size = 2;

0 commit comments

Comments
 (0)