aboutsummaryrefslogtreecommitdiff
path: root/src/utility.h
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-04-09 18:31:44 +0200
committerAdrian Kummerländer2014-04-09 18:31:44 +0200
commit572af7499d088a239d37e9dc09e5e7ac45c13d29 (patch)
tree3cd5f8ea987b051ef32cc47bec119f6c54d606f1 /src/utility.h
parent0c93a8da8236dcb3c47fa650ad9eecb89d63b9f0 (diff)
downloadCodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar.gz
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar.bz2
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar.lz
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar.xz
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.tar.zst
CodepointIterator-572af7499d088a239d37e9dc09e5e7ac45c13d29.zip
Switched to standard integer types
* i.e. replaced uint8_t with std::uint8_t contained within the standard namespace ** as this version of the types is defined by the standard this should offer better compiler independence and standard compliance * removed unnecessary pointer and reference type arguments in the std::iterator template specializations the CodepointIterator class is derived from
Diffstat (limited to 'src/utility.h')
-rw-r--r--src/utility.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utility.h b/src/utility.h
index dcdcf75..e185e3e 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -6,22 +6,22 @@
namespace UTF8 {
namespace dtl {
-enum class CodeUnitType : uint8_t {
+enum class CodeUnitType : std::uint8_t {
CONTINUATION = (128 >> 0), // 10000000
LEADING = (128 >> 1), // 01000000
THREE = (128 >> 2), // 00100000
FOUR = (128 >> 3), // 00010000
};
-enum class CodePoint : uint8_t {
+enum class CodePoint : std::uint8_t {
CONTINUATION = (UINT8_MAX >> 2), // 00111111
TWO = (UINT8_MAX >> 3), // 00011111
THREE = (UINT8_MAX >> 4), // 00001111
FOUR = (UINT8_MAX >> 5), // 00000111
};
-bool match(const uint8_t&, CodeUnitType&&);
-void write(char32_t&, const uint8_t&, CodePoint&&, const uint8_t&);
+bool match(const std::uint8_t&, CodeUnitType&&);
+void write(char32_t&, const std::uint8_t&, CodePoint&&, const std::uint8_t&);
}
}