Fix other warnings about conversion but in C++

This commit is contained in:
Patrick Pelissier committed 2020-06-14 01:10:37 +02:00
1 parent a7749e944f
commit ef74f8eb55
3 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -1323,7 +1323,7 @@ stringi_utf8_decode(char c, stringi_utf8_state_e *state,
const string_unicode_t mask1 = -(string_unicode_t)(*state != STRINGI_UTF8_STARTING);
const string_unicode_t mask2 = (0xFFU >> type);
*unicode = ((*unicode << 6) & mask1) | ((unsigned int) c & mask2);
*state = (stringi_utf8_state_e) STRINGI_UTF8_STATE_TAB[*state + type];
*state = (stringi_utf8_state_e) STRINGI_UTF8_STATE_TAB[(unsigned int) *state + type];
}
/* Check if the given array of characters is a valid UTF8 stream */
@@ -1579,7 +1579,7 @@ string_utf8_p(string_t str)
.ptr = ((struct { long long _n; char _d[sizeof (s)]; }){ 0, s })._d }})
#else
namespace m_string {
template <int N>
template <unsigned int N>
struct m_aligned_string {
string_t string;
union {
@@ -2102,7 +2102,7 @@ namespace m_string {
((const struct M_C(name, _s) *)((M_C(name, _array_t)){string}))
#else
namespace m_string {
template <int N>
template <unsigned int N>
struct m_bounded_string {
char s[N];
inline m_bounded_string(const char lstr[])
+1 -1
View File
@@ -55,7 +55,7 @@
#else
#include <initializer_list>
namespace m_tuple {
template <int N>
template <unsigned int N>
struct m_int_array {
int data[N];
/*constexpr*/ inline m_int_array(std::initializer_list<int> init){
+1 -1
View File
@@ -370,7 +370,7 @@
static inline size_t M_C(name, _hash)(M_C(name,_t) const e1) { \
VARIANTI_CONTRACT(name, e1); \
M_HASH_DECL(hash); \
M_HASH_UP (hash, e1 -> type); \
M_HASH_UP (hash, (unsigned int) (e1 -> type)); \
switch (e1->type) { \
case M_C(name, _EMPTY): break; \
M_MAP2(VARIANTI_DEFINE_HASH_FUNC , name, __VA_ARGS__) \