diff options
author | Linus Groh <mail@linusgroh.de> | 2022-10-17 00:06:11 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-12-03 23:52:23 +0000 |
commit | d26aabff0401690d6dd1332558b40f5cb64e4428 (patch) | |
tree | fd56d0ab5b672814a1a2fb7b8a92fefb01f24e6f /Userland/Libraries/LibGUI/ItemListModel.h | |
parent | 8639d8bc212dcb45aff80405b4b0f6b1ef1087e7 (diff) | |
download | serenity-d26aabff0401690d6dd1332558b40f5cb64e4428.zip |
Everywhere: Run clang-format
Diffstat (limited to 'Userland/Libraries/LibGUI/ItemListModel.h')
-rw-r--r-- | Userland/Libraries/LibGUI/ItemListModel.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Userland/Libraries/LibGUI/ItemListModel.h b/Userland/Libraries/LibGUI/ItemListModel.h index 68a9e26a0f..263a3d1377 100644 --- a/Userland/Libraries/LibGUI/ItemListModel.h +++ b/Userland/Libraries/LibGUI/ItemListModel.h @@ -16,21 +16,22 @@ namespace GUI { template<typename T, typename Container = Vector<T>, typename ColumnNameListType = void> class ItemListModel : public Model { public: - static constexpr auto IsTwoDimensional = requires(Container data) - { - requires !IsVoid<ColumnNameListType>; - data.at(0).at(0); - data.at(0).size(); - }; + static constexpr auto IsTwoDimensional = requires(Container data) { + requires !IsVoid<ColumnNameListType>; + data.at(0).at(0); + data.at(0).size(); + }; // Substitute 'void' for a dummy u8. using ColumnNamesT = Conditional<IsVoid<ColumnNameListType>, u8, ColumnNameListType>; - static NonnullRefPtr<ItemListModel> create(Container const& data, ColumnNamesT const& column_names, Optional<size_t> const& row_count = {}) requires(IsTwoDimensional) + static NonnullRefPtr<ItemListModel> create(Container const& data, ColumnNamesT const& column_names, Optional<size_t> const& row_count = {}) + requires(IsTwoDimensional) { return adopt_ref(*new ItemListModel<T, Container, ColumnNameListType>(data, column_names, row_count)); } - static NonnullRefPtr<ItemListModel> create(Container const& data, Optional<size_t> const& row_count = {}) requires(!IsTwoDimensional) + static NonnullRefPtr<ItemListModel> create(Container const& data, Optional<size_t> const& row_count = {}) + requires(!IsTwoDimensional) { return adopt_ref(*new ItemListModel<T, Container>(data, row_count)); } @@ -119,13 +120,15 @@ public: } protected: - explicit ItemListModel(Container const& data, Optional<size_t> row_count = {}) requires(!IsTwoDimensional) + explicit ItemListModel(Container const& data, Optional<size_t> row_count = {}) + requires(!IsTwoDimensional) : m_data(data) , m_provided_row_count(move(row_count)) { } - explicit ItemListModel(Container const& data, ColumnNamesT const& column_names, Optional<size_t> row_count = {}) requires(IsTwoDimensional) + explicit ItemListModel(Container const& data, ColumnNamesT const& column_names, Optional<size_t> row_count = {}) + requires(IsTwoDimensional) : m_data(data) , m_column_names(column_names) , m_provided_row_count(move(row_count)) |