• Marko Mäkelä's avatar
    MDEV-19212: Replace macros with type-safe inline functions · e7f426d2
    Marko Mäkelä authored
    The regression that was reported in MDEV-19212 occurred due to use
    of macros that did not ensure that the arguments have compatible
    types.
    
    ut_2pow_remainder(), ut_2pow_round(), ut_calc_align(): Define as
    inline function templates.
    
    UT_CALC_ALIGN(): Define as a macro, because this is used in
    compile_time_assert(). Only starting with C++11 (MariaDB 10.4)
    we could define the inline functions as constexpr.
    e7f426d2
log0log.cc 61.9 KB