Skip to content

Commit

Permalink
GTK: Add explicit operator= to binding
Browse files Browse the repository at this point in the history
Silences a new warning in GCC 9. implicit operator= is now
deprecated.
  • Loading branch information
bearoso committed Jun 19, 2019
1 parent 721abf5 commit 1580c5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gtk/src/gtk_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ Binding::Binding (const Binding& binding)
this->value = binding.value;
}

Binding &Binding::operator=(const Binding &binding)
{
this->value = binding.value;
return *this;
}

bool
Binding::matches (Binding &binding)
{
Expand Down
1 change: 1 addition & 0 deletions gtk/src/gtk_binding.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Binding
Binding (unsigned int key, bool ctrl, bool shift, bool alt);
Binding (unsigned int device, unsigned int button, unsigned int threshold);
Binding (const Binding &binding);
Binding &operator=(const Binding &binding);
Binding (GdkEventKey *event);
Binding (unsigned int);
Binding ();
Expand Down

0 comments on commit 1580c5f

Please sign in to comment.