Commit e43156e1 authored by Alexander Barkov's avatar Alexander Barkov

Removing the duplicate copy of char_to_byte_length_safe().

It appeared during a merge from 10.2 to bb-10.2-ext.
parent a4a48a37
......@@ -96,13 +96,6 @@ enum precedence {
typedef Bounds_checked_array<Item*> Ref_ptr_array;
static inline uint32
char_to_byte_length_safe(size_t char_length_arg, uint32 mbmaxlen_arg)
{
ulonglong tmp= ((ulonglong) char_length_arg) * mbmaxlen_arg;
return tmp > UINT_MAX32 ? UINT_MAX32 : static_cast<uint32>(tmp);
}
bool mark_unsupported_function(const char *where, void *store, uint result);
/* convenience helper for mark_unsupported_function() above */
......
......@@ -184,10 +184,10 @@ class DTCollation {
static inline uint32
char_to_byte_length_safe(uint32 char_length_arg, uint32 mbmaxlen_arg)
char_to_byte_length_safe(size_t char_length_arg, uint32 mbmaxlen_arg)
{
ulonglong tmp= ((ulonglong) char_length_arg) * mbmaxlen_arg;
return (tmp > UINT_MAX32) ? (uint32) UINT_MAX32 : (uint32) tmp;
return tmp > UINT_MAX32 ? UINT_MAX32 : static_cast<uint32>(tmp);
}
/**
......
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