[apps/code] Remove unneeded arguments

This commit is contained in:
Léa Saviot
2020-01-17 14:28:08 +01:00
parent c6c3e3f340
commit 1dacd71acb
3 changed files with 12 additions and 12 deletions

View File

@@ -55,12 +55,12 @@ int ConsoleStore::numberOfLines() const {
return 0;
}
const char * ConsoleStore::pushCommand(const char * text, size_t length) {
return push(CurrentSessionCommandMarker, text, length);
const char * ConsoleStore::pushCommand(const char * text) {
return push(CurrentSessionCommandMarker, text);
}
void ConsoleStore::pushResult(const char * text, size_t length) {
push(CurrentSessionResultMarker, text, length);
void ConsoleStore::pushResult(const char * text) {
push(CurrentSessionResultMarker, text);
}
void ConsoleStore::deleteLastLineIfEmpty() {
@@ -91,9 +91,9 @@ int ConsoleStore::deleteCommandAndResultsAtIndex(int index) {
return indexOfLineToDelete;
}
const char * ConsoleStore::push(const char marker, const char * text, size_t length) {
size_t textLength = length;
if (ConsoleLine::sizeOfConsoleLine(length) > k_historySize - 1) {
const char * ConsoleStore::push(const char marker, const char * text) {
size_t textLength = strlen(text);
if (ConsoleLine::sizeOfConsoleLine(textLength) > k_historySize - 1) {
textLength = k_historySize - 1 - 1 - 1; // Marker, null termination and null marker.
}
int i = indexOfNullMarker();