* Fixed broken operator=(). Thanks Stephan!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -241,7 +241,7 @@ Keymap::IsModifierKey(uint32 keyCode)
|
|||||||
|
|
||||||
|
|
||||||
//! We need to know a modifier for a key
|
//! We need to know a modifier for a key
|
||||||
uint32
|
uint32
|
||||||
Keymap::Modifier(uint32 keyCode)
|
Keymap::Modifier(uint32 keyCode)
|
||||||
{
|
{
|
||||||
if (keyCode == fKeys.caps_key)
|
if (keyCode == fKeys.caps_key)
|
||||||
@@ -612,6 +612,9 @@ Keymap::SetKey(uint32 keyCode, uint32 modifiers, int8 deadKey,
|
|||||||
Keymap&
|
Keymap&
|
||||||
Keymap::operator=(const Keymap& other)
|
Keymap::operator=(const Keymap& other)
|
||||||
{
|
{
|
||||||
|
if (this == &other)
|
||||||
|
return *this;
|
||||||
|
|
||||||
delete[] fChars;
|
delete[] fChars;
|
||||||
delete fModificationMessage;
|
delete fModificationMessage;
|
||||||
|
|
||||||
@@ -629,6 +632,8 @@ Keymap::operator=(const Keymap& other)
|
|||||||
|
|
||||||
if (other.fModificationMessage != NULL)
|
if (other.fModificationMessage != NULL)
|
||||||
fModificationMessage = new BMessage(*other.fModificationMessage);
|
fModificationMessage = new BMessage(*other.fModificationMessage);
|
||||||
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user