mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 05:10:26 +00:00
Uses limits instead of climits
This commit is contained in:
parent
2d32954888
commit
d9c3ba03f4
1 changed files with 3 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
||||||
#ifndef GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
#ifndef GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
||||||
#define GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
#define GAME_MWDIALOGUE_KEYWORDSEARCH_H
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include <climits>
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <map>
|
||||||
|
#include <limits>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm> // std::reverse
|
#include <algorithm> // std::reverse
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
|
|
||||||
static bool isWhitespaceUTF8(const int utf8Char)
|
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
|
//That function has undefined behavior if the character doesn't fit in unsigned char
|
||||||
return std::isspace(utf8Char);
|
return std::isspace(utf8Char);
|
||||||
|
|
Loading…
Reference in a new issue