Changeset 1449 for code/branches/network/src/core
- Timestamp:
- May 28, 2008, 11:02:36 AM (16 years ago)
- Location:
- code/branches/network/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/InputBuffer.h
r1446 r1449 66 66 { 67 67 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned}; 68 *((int*)(&newListener.listener_)) = (int)(listener); 69 68 70 this->listeners_.insert(this->listeners_.end(), newListener); 69 71 } … … 72 74 { 73 75 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned}; 76 *((int*)(&newListener.listener_)) = (int)(listener); 74 77 this->listeners_.insert(this->listeners_.end(), newListener); 75 78 } … … 79 82 { 80 83 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, KeyCode::Unassigned}; 84 *((int*)(&newListener.listener_)) = (int)(listener); 81 85 this->listeners_.insert(this->listeners_.end(), newListener); 82 86 } … … 85 89 { 86 90 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, false, _char, KeyCode::Unassigned}; 91 *((int*)(&newListener.listener_)) = (int)(listener); 87 92 this->listeners_.insert(this->listeners_.end(), newListener); 88 93 } … … 92 97 { 93 98 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key}; 99 *((int*)(&newListener.listener_)) = (int)(listener); 94 100 this->listeners_.insert(this->listeners_.end(), newListener); 95 101 } … … 98 104 { 99 105 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, true, true, '\0', key}; 106 *((int*)(&newListener.listener_)) = (int)(listener); 100 107 this->listeners_.insert(this->listeners_.end(), newListener); 101 108 } -
code/branches/network/src/core/Shell.cc
r1447 r1449 102 102 { 103 103 this->inputBuffer_->unregisterListener(this); 104 // TODO: may be very dangerous. InputManager already deletes InputBuffer instance!!! 104 105 delete this->inputBuffer_; 105 106 }
Note: See TracChangeset
for help on using the changeset viewer.