mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Uses limits instead of climits
This commit is contained in:
parent
2d32954888
commit
d9c3ba03f4
@ -1,9 +1,9 @@
|
||||
#ifndef GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
||||
#define GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
||||
|
||||
#include <map>
|
||||
#include <climits>
|
||||
#include <cctype>
|
||||
#include <map>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <algorithm> // std::reverse
|
||||
@ -71,7 +71,7 @@ public:
|
||||
|
||||
static bool isWhitespaceUTF8(const int utf8Char)
|
||||
{
|
||||
if (utf8Char >= 0 && utf8Char <= UCHAR_MAX)
|
||||
if (utf8Char >= 0 && utf8Char <= static_cast<int>( std::numeric_limits<unsigned char>::max()))
|
||||
{
|
||||
//That function has undefined behavior if the character doesn't fit in unsigned char
|
||||
return std::isspace(utf8Char);
|
||||
|
Loading…
x
Reference in New Issue
Block a user