aboutsummaryrefslogtreecommitdiff
path: root/src/codepoint_iterator.cc
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/codepoint_iterator.cc
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/codepoint_iterator.cc')
-rw-r--r--src/codepoint_iterator.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codepoint_iterator.cc b/src/codepoint_iterator.cc
index 99ea866..b2f6d81 100644
--- a/src/codepoint_iterator.cc
+++ b/src/codepoint_iterator.cc
@@ -35,8 +35,8 @@ bool CodepointIterator::operator!=(
}
char32_t CodepointIterator::operator*() {
- uint8_t currByte = *(this->iterator_);
- char32_t codePoint = 0;
+ std::uint8_t currByte = *(this->iterator_);
+ char32_t codePoint = 0;
if ( match(currByte, dtl::CodeUnitType::CONTINUATION) ) {
if ( match(currByte, dtl::CodeUnitType::THREE) ) {
@@ -89,8 +89,8 @@ char32_t CodepointIterator::operator*() {
}
CodepointIterator& CodepointIterator::operator++() {
- uint8_t currByte = *(this->iterator_);
- std::string::difference_type offset = 1;
+ std::uint8_t currByte(*(this->iterator_));
+ std::string::difference_type offset(1);
if ( match(currByte, dtl::CodeUnitType::CONTINUATION) ) {
if ( match(currByte, dtl::CodeUnitType::THREE) ) {