Skip to content

Commit

Permalink
Rename UNICODE to UCODE in SyntaxFlags
Browse files Browse the repository at this point in the history
Summary:
The name `UNICODE` conflicts with a preprocessor flag that gets passed
in on Windows. To avoid this, rename the constant.

Reviewed By: nlutsenko

Differential Revision: D30308188

fbshipit-source-id: 408754e15507a604dd8c5a281893e22fdd03fb1e
  • Loading branch information
neildhar authored and facebook-github-bot committed Aug 13, 2021
1 parent f3421c6 commit 0d06317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/hermes/Regex/RegexTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class SyntaxFlags {
ICASE = 1 << 0,
GLOBAL = 1 << 1,
MULTILINE = 1 << 2,
UNICODE = 1 << 3,
UCODE = 1 << 3,
DOTALL = 1 << 4,
STICKY = 1 << 5
};
Expand All @@ -225,7 +225,7 @@ class SyntaxFlags {
if (multiline)
ret |= MULTILINE;
if (unicode)
ret |= UNICODE;
ret |= UCODE;
if (sticky)
ret |= STICKY;
if (dotAll)
Expand All @@ -244,7 +244,7 @@ class SyntaxFlags {
ret.ignoreCase = 1;
if (byte & MULTILINE)
ret.multiline = 1;
if (byte & UNICODE)
if (byte & UCODE)
ret.unicode = 1;
if (byte & STICKY)
ret.sticky = 1;
Expand Down

0 comments on commit 0d06317

Please sign in to comment.