Skip to content

Commit

Permalink
[core] Resolved GCC13 build warning regarding std::copy of a bool.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Nov 6, 2024
1 parent e23497d commit ab09e33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,12 @@ template <class ValueType>
static void importOption(vector<CUDTGroup::ConfigItem>& storage, SRT_SOCKOPT optname, const ValueType& field)
{
ValueType default_opt = ValueType();
int default_opt_size = sizeof(ValueType);
const int default_opt_size = sizeof(ValueType);
ValueType opt = field;
if (!getOptDefault(optname, (&default_opt), (default_opt_size)) || default_opt != opt)
int opt_size = default_opt_size;
if (!getOptDefault(optname, (&default_opt), (opt_size)) || default_opt != opt)
{
SRT_ASSERT(default_opt_size == default_opt_size);
// Store the option when:
// - no default for this option is found
// - the option value retrieved from the field is different than default
Expand Down

0 comments on commit ab09e33

Please sign in to comment.