summaryrefslogtreecommitdiff
path: root/sql/sql_array.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-01-22 11:35:50 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-01-22 16:01:35 +0200
commitcdd54c852a8491b7e0b949058e0bf7040015f31f (patch)
treed62b6f4a55ea3d36949ff48c577c4e2b8597c777 /sql/sql_array.h
parenteab0dc6854ac43d81216aaea80b0ee41d7058e7c (diff)
downloadmariadb-git-cdd54c852a8491b7e0b949058e0bf7040015f31f.tar.gz
Cleanup: Make Bounds_checked_array default-constructible
Diffstat (limited to 'sql/sql_array.h')
-rw-r--r--sql/sql_array.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_array.h b/sql/sql_array.h
index b05e8f779bd..44dde114d62 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -3,6 +3,7 @@
/* Copyright (c) 2003, 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
Use is subject to license terms.
+ Copyright (c) 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +35,7 @@
template <typename Element_type> class Bounds_checked_array
{
public:
- Bounds_checked_array() : m_array(NULL), m_size(0) {}
+ Bounds_checked_array()= default;
Bounds_checked_array(Element_type *el, size_t size_arg)
: m_array(el), m_size(size_arg)
@@ -99,8 +100,8 @@ public:
}
private:
- Element_type *m_array;
- size_t m_size;
+ Element_type *m_array= nullptr;
+ size_t m_size= 0;
};
/*