Commit 2760f516 authored by Matthias Vallentin's avatar Matthias Vallentin

Perform minor cosmetic touch-ups

parent 0bcb5c9d
......@@ -137,7 +137,7 @@ public:
typename std::enable_if<std::is_floating_point<T>::value, error>::type
apply(T& x) {
static constexpr auto tlindex = detail::tl_index_of<builtin_t, T>::value;
static_assert(tlindex >= 0, "T not recognized as builtiln type");
static_assert(tlindex >= 0, "T not recognized as builtin type");
return apply_builtin(static_cast<builtin>(tlindex), &x);
}
......@@ -153,7 +153,7 @@ public:
static_cast<int>(sizeof(T)) * (std::is_signed<T>::value ? -1 : 1)
>::type;
static constexpr auto tlindex = detail::tl_index_of<builtin_t, type>::value;
static_assert(tlindex >= 0, "T not recognized as builtiln type");
static_assert(tlindex >= 0, "T not recognized as builtin type");
return apply_builtin(static_cast<builtin>(tlindex), &x);
}
......
......@@ -105,14 +105,14 @@ protected:
template <class T>
error varbyte_decode(T& x) {
static_assert(std::is_unsigned<T>::value, "T must be an unsigned type");
T n = 0;
auto n = 0;
x = 0;
uint8_t low7;
do {
auto c = streambuf_.sbumpc();
using traits = typename streambuf_type::traits_type;
if (traits::eq_int_type(c, traits::eof()))
return sec::end_of_stream;
auto c = streambuf_.sbumpc();
using traits = typename streambuf_type::traits_type;
if (traits::eq_int_type(c, traits::eof()))
return sec::end_of_stream;
low7 = static_cast<uint8_t>(traits::to_char_type(c));
x |= static_cast<T>((low7 & 0x7F)) << (7 * n);
++n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment