ams-libs: AMS_ASSERT no longer invokes expression

This commit is contained in:
Michael Scire 2021-09-29 21:32:40 -07:00
parent 5dc64bc1f7
commit 9b04ff0f54
38 changed files with 82 additions and 23 deletions

View file

@ -29,8 +29,11 @@ namespace ams::fs {
u32 *dst_invalid = this->invalid_chars;
for (const char *cur = ":*?<>|"; *cur != '\x00'; ++cur) {
AMS_ASSERT(dst_invalid < std::end(this->invalid_chars));
const auto result = util::ConvertCharacterUtf8ToUtf32(dst_invalid, cur);
AMS_ASSERT(result == util::CharacterEncodingResult_Success);
AMS_UNUSED(result);
++dst_invalid;
}
AMS_ASSERT(dst_invalid == std::end(this->invalid_chars));
@ -39,8 +42,11 @@ namespace ams::fs {
u32 *dst_sep = this->separators;
for (const char *cur = "/\\"; *cur != '\x00'; ++cur) {
AMS_ASSERT(dst_sep < std::end(this->separators));
const auto result = util::ConvertCharacterUtf8ToUtf32(dst_sep, cur);
AMS_ASSERT(result == util::CharacterEncodingResult_Success);
AMS_UNUSED(result);
++dst_sep;
}
AMS_ASSERT(dst_sep == std::end(this->separators));