- Timestamp:
- Dec 2, 2015, 11:22:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc
r10821 r10916 110 110 void InputBuffer::insert(const std::string& input, bool update) 111 111 { 112 for ( auto & elem: input)113 { 114 this->insert( elem, false);112 for (const char& inputChar : input) 113 { 114 this->insert(inputChar, false); 115 115 116 116 if (update) 117 this->updated( elem, false);117 this->updated(inputChar, false); 118 118 } 119 119 … … 170 170 void InputBuffer::updated() 171 171 { 172 for ( auto & elem: this->listeners_)173 { 174 if ( (elem)->bListenToAllChanges_)175 (elem)->callFunction();172 for (BaseInputBufferListenerTuple* listener : this->listeners_) 173 { 174 if (listener->bListenToAllChanges_) 175 listener->callFunction(); 176 176 } 177 177 } … … 179 179 void InputBuffer::updated(const char& update, bool bSingleInput) 180 180 { 181 for ( auto & elem: this->listeners_)182 { 183 if ((! (elem)->trueKeyFalseChar_) && ((elem)->bListenToAllChanges_ || ((elem)->char_ == update)) && (!(elem)->bOnlySingleInput_ || bSingleInput))184 (elem)->callFunction();181 for (BaseInputBufferListenerTuple* listener : this->listeners_) 182 { 183 if ((!listener->trueKeyFalseChar_) && (listener->bListenToAllChanges_ || (listener->char_ == update)) && (!listener->bOnlySingleInput_ || bSingleInput)) 184 listener->callFunction(); 185 185 } 186 186 } … … 201 201 return; 202 202 203 for ( auto & elem: this->listeners_)204 { 205 if ( (elem)->trueKeyFalseChar_ && ((elem)->key_ == evt.getKeyCode()))206 (elem)->callFunction();203 for (BaseInputBufferListenerTuple* listener : this->listeners_) 204 { 205 if (listener->trueKeyFalseChar_ && (listener->key_ == evt.getKeyCode())) 206 listener->callFunction(); 207 207 } 208 208
Note: See TracChangeset
for help on using the changeset viewer.