Revert stop_character_mask to a complement. 50/head
authorJakob Petsovits <jpetso@gmx.at>
Mon, 16 Jul 2018 05:03:51 +0000 (01:03 -0400)
committerJakob Petsovits <jpetso@gmx.at>
Mon, 16 Jul 2018 05:25:56 +0000 (01:25 -0400)
Somehow this makes the MSVC build faster, so we want it.

This time without any more warnings (afaik), by appending
the "u" unsigned suffix to the hex mask for type compatibility.

cppcodec/detail/stream_codec.hpp

index efd67a6..122454e 100644 (file)
@@ -241,7 +241,7 @@ struct alphabet_index_info
     static constexpr const alphabet_index_t padding_idx = 1 << 8;
     static constexpr const alphabet_index_t invalid_idx = 1 << 9;
     static constexpr const alphabet_index_t eof_idx = 1 << 10;
-    static constexpr const alphabet_index_t stop_character_mask = 0xFF00;
+    static constexpr const alphabet_index_t stop_character_mask{~0xFFu};
 
     static constexpr const bool padding_allowed = padding_searcher<
             CodecVariant, num_possible_symbols>::exists_padding_symbol();