Skip to content

Commit

Permalink
silence warning about uninitialized optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Youda008 committed Jun 7, 2023
1 parent 3164e78 commit f17b192
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Widgets/ListModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class DropTarget {
//======================================================================================================================
// support structs

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // std::optional sometimes makes false positive warnings

/** Each item of ReadOnlyListModel must inherit from this struct to satisfy the requirements of the model.
* The following methods should be overriden to point to the appropriate members. */
struct ReadOnlyListModelItem
Expand All @@ -102,6 +105,8 @@ struct ReadOnlyListModelItem
}
};

#pragma GCC diagnostic pop

/** Each item of EditableListModel must inherit from this struct to satisfy the requirements of the model.
* The following methods should be overriden to point to the appropriate members. */
struct EditableListModelItem : public ReadOnlyListModelItem
Expand Down

0 comments on commit f17b192

Please sign in to comment.