Skip to content

Fix compile error caused by customized mapping of enums during JSONSerialization #78009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/swift/Basic/JSONSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,21 +443,21 @@ class Output {
template <typename T>
void bitSetCase(T &Val, const char* Str, const T ConstVal) {
if (bitSetMatch(Str, (Val & ConstVal) == ConstVal)) {
Val = Val | ConstVal;
Val = static_cast<T>(Val | ConstVal);
}
}

template <typename T>
void maskedBitSetCase(T &Val, const char *Str, T ConstVal, T Mask) {
if (bitSetMatch(Str, (Val & Mask) == ConstVal))
Val = Val | ConstVal;
Val = static_cast<T>(Val | ConstVal);
}

template <typename T>
void maskedBitSetCase(T &Val, const char *Str, uint32_t ConstVal,
uint32_t Mask) {
if (bitSetMatch(Str, (Val & Mask) == ConstVal))
Val = Val | ConstVal;
Val = static_cast<T>(Val | ConstVal);
}

template <typename T>
Expand Down