summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorhimajin100000 <himajin100000@gmail.com>2019-04-07 21:43:55 +0900
committerhimajin100000 <himajin100000@gmail.com>2019-04-10 23:49:10 +0900
commit1fbbb3e499873e92d775cac9cc285b3c362e5db7 (patch)
tree2ecdd62af29a677d8fa5cc8131eb96907db56f4e /goo
parent4ae6786469ec0268307fa05cb6d9ce58b4541941 (diff)
avoid warning C4310: cast truncates constant value
Diffstat (limited to 'goo')
-rw-r--r--goo/GooString.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/goo/GooString.h b/goo/GooString.h
index 8d2c6d4b..74e4f77f 100644
--- a/goo/GooString.h
+++ b/goo/GooString.h
@@ -25,6 +25,7 @@
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
// Copyright (C) 2019 Christophe Fergeau <cfergeau@redhat.com>
+// Copyright (C) 2019 Tomoyuki Kubota <himajin100000@gmail.com>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
@@ -172,8 +173,8 @@ public:
// Return true if string ends with suffix
bool endsWith(const char *suffix) const;
- bool hasUnicodeMarker() const { return size() >= 2 && (*this)[0] == char(0xfe) && (*this)[1] == char(0xff); }
- bool hasUnicodeMarkerLE() const { return size() >= 2 && (*this)[0] == char(0xff) && (*this)[1] == char(0xfe); }
+ bool hasUnicodeMarker() const { return size() >= 2 && (*this)[0] == '\xfe' && (*this)[1] == '\xff'; }
+ bool hasUnicodeMarkerLE() const { return size() >= 2 && (*this)[0] == '\xff' && (*this)[1] == '\xfe'; }
bool hasJustUnicodeMarker() const { return size() == 2 && hasUnicodeMarker(); }
void prependUnicodeMarker();