Skip to content

Commit f17b192

Browse files
committed
silence warning about uninitialized optional
1 parent 3164e78 commit f17b192

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Widgets/ListModel.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class DropTarget {
8585
//======================================================================================================================
8686
// support structs
8787

88+
#pragma GCC diagnostic push
89+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // std::optional sometimes makes false positive warnings
90+
8891
/** Each item of ReadOnlyListModel must inherit from this struct to satisfy the requirements of the model.
8992
* The following methods should be overriden to point to the appropriate members. */
9093
struct ReadOnlyListModelItem
@@ -102,6 +105,8 @@ struct ReadOnlyListModelItem
102105
}
103106
};
104107

108+
#pragma GCC diagnostic pop
109+
105110
/** Each item of EditableListModel must inherit from this struct to satisfy the requirements of the model.
106111
* The following methods should be overriden to point to the appropriate members. */
107112
struct EditableListModelItem : public ReadOnlyListModelItem

0 commit comments

Comments
 (0)