Changeset 6394 for code/branches/presentation2/src/libraries/core/Shell.cc
- Timestamp:
- Dec 22, 2009, 2:07:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/Shell.cc
r6379 r6394 226 226 } 227 227 228 std::stringShell::getFromHistory() const228 const std::string& Shell::getFromHistory() const 229 229 { 230 230 unsigned int index = mod(static_cast<int>(this->historyOffset_) - static_cast<int>(this->historyPosition_), this->maxHistoryLength_); … … 232 232 return this->commandHistory_[index]; 233 233 else 234 return "";234 return BLANKSTRING; 235 235 } 236 236 … … 251 251 newline = (!eof && !fail); 252 252 253 if (!newline && output == "")253 if (!newline && output.empty()) 254 254 break; 255 255 … … 400 400 return; 401 401 unsigned int cursorPosition = this->getCursorPosition(); 402 std::stringinput_str(this->getInput().substr(0, cursorPosition)); // only search for the expression from the beginning of the inputline until the cursor position402 const std::string& input_str(this->getInput().substr(0, cursorPosition)); // only search for the expression from the beginning of the inputline until the cursor position 403 403 for (unsigned int newPos = this->historyPosition_ + 1; newPos <= this->historyOffset_; newPos++) 404 404 { … … 418 418 return; 419 419 unsigned int cursorPosition = this->getCursorPosition(); 420 std::stringinput_str(this->getInput().substr(0, cursorPosition)); // only search for the expression from the beginning420 const std::string& input_str(this->getInput().substr(0, cursorPosition)); // only search for the expression from the beginning 421 421 for (unsigned int newPos = this->historyPosition_ - 1; newPos > 0; newPos--) 422 422 {
Note: See TracChangeset
for help on using the changeset viewer.