From 90a1845e8083c7c71c021c4d79b4a5ce06ea56de Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Fri, 6 Mar 2020 17:02:28 +0300 Subject: allow creating span from const T buf[2] --- storage/innobase/include/span.h | 3 ++- storage/innobase/log/log0log.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/innobase/include/span.h b/storage/innobase/include/span.h index 3a056baee4d..3857f591123 100644 --- a/storage/innobase/include/span.h +++ b/storage/innobase/include/span.h @@ -20,12 +20,13 @@ this program; if not, write to the Free Software Foundation, Inc., #include #include +#include namespace st_ { template class span { public: - typedef ElementType element_type; + using element_type = typename std::remove_cv::type; typedef ElementType value_type; typedef size_t index_type; typedef ptrdiff_t difference_type; diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 34c82759f95..51b51facce2 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -1012,7 +1012,7 @@ func_exit: buf[0]= FILE_CHECKPOINT | (8 + 6); mach_write_to_8(&buf[1], flush_lsn); mach_write_to_4(&buf[1 + 8 + 6], ut_crc32(buf, 1 + 8 + 6)); - log_sys.append_to_main_log({buf, sizeof buf}); + log_sys.append_to_main_log(buf); log_mutex_enter(); -- cgit v1.2.1