Skip to content

Commit

Permalink
Merge remote-tracking branch 'robux4/if_constexpr'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbunkus committed Feb 24, 2024
2 parents 14ca31d + 828c7f1 commit c5198ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EbmlUnicodeString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void UTFstring::UpdateFromUCS2(std::wstring_view WString)
// representation must actually be compatible with the C++
// library's implementation. Implementations with sizeof(wchar_t)
// == 4 are using UCS4.
if (sizeof(wchar_t) == 2)
if constexpr (sizeof(wchar_t) == 2)
::utf8::utf16to8(WString.begin(), Current, std::back_inserter(UTF8string));
else
::utf8::utf32to8(WString.begin(), Current, std::back_inserter(UTF8string));
Expand Down

0 comments on commit c5198ed

Please sign in to comment.