1
0
Fork 0

Codechange: remove StrEmpty

pull/14191/head
Rubidium 2025-05-03 11:46:27 +02:00 committed by rubidium42
parent d037dbb42a
commit 6a9f694158
2 changed files with 1 additions and 13 deletions

View File

@ -97,7 +97,7 @@ struct FileStringReader : StringReader {
{
this->StringReader::ParseFile();
if (StrEmpty(_strgen.lang.name) || StrEmpty(_strgen.lang.own_name) || StrEmpty(_strgen.lang.isocode)) {
if (*_strgen.lang.name == '\0' || *_strgen.lang.own_name == '\0' || *_strgen.lang.isocode == '\0') {
FatalError("Language must include ##name, ##ownname and ##isocode");
}
}

View File

@ -58,18 +58,6 @@ struct CaseInsensitiveComparator {
bool operator()(std::string_view s1, std::string_view s2) const { return StrCompareIgnoreCase(s1, s2) < 0; }
};
/**
* Check if a string buffer is empty.
*
* @param s The pointer to the first element of the buffer
* @return true if the buffer starts with the terminating null-character or
* if the given pointer points to nullptr else return false
*/
inline bool StrEmpty(const char *s)
{
return s == nullptr || s[0] == '\0';
}
bool IsValidChar(char32_t key, CharSetFilter afilter);
size_t Utf8StringLength(std::string_view str);