GTK: Add explicit operator= to binding

Silences a new warning in GCC 9. implicit operator= is now
deprecated.
This commit is contained in:
Brandon Wright 2019-06-19 12:14:03 -05:00
parent 721abf510c
commit 1580c5f00f
2 changed files with 7 additions and 0 deletions

View File

@ -75,6 +75,12 @@ Binding::Binding (const Binding& binding)
this->value = binding.value; this->value = binding.value;
} }
Binding &Binding::operator=(const Binding &binding)
{
this->value = binding.value;
return *this;
}
bool bool
Binding::matches (Binding &binding) Binding::matches (Binding &binding)
{ {

View File

@ -37,6 +37,7 @@ class Binding
Binding (unsigned int key, bool ctrl, bool shift, bool alt); Binding (unsigned int key, bool ctrl, bool shift, bool alt);
Binding (unsigned int device, unsigned int button, unsigned int threshold); Binding (unsigned int device, unsigned int button, unsigned int threshold);
Binding (const Binding &binding); Binding (const Binding &binding);
Binding &operator=(const Binding &binding);
Binding (GdkEventKey *event); Binding (GdkEventKey *event);
Binding (unsigned int); Binding (unsigned int);
Binding (); Binding ();