1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 20:54:08 +01:00

Codefix: Comment style. (#14064)

This commit is contained in:
frosch
2025-04-21 17:25:09 +02:00
committed by GitHub
parent 5b2754fdee
commit 2a62eea005
29 changed files with 64 additions and 62 deletions

View File

@@ -17,9 +17,12 @@
#include "safeguards.h"
/**
* @return true, if the textbuf was updated.
*/
bool AutoCompletion::AutoComplete()
{
// We are pressing TAB for the first time after reset.
/* We are pressing TAB for the first time after reset. */
if (this->suggestions.empty()) {
this->InitSuggestions(this->textbuf->GetText());
if (this->suggestions.empty()) {
@@ -29,11 +32,11 @@ bool AutoCompletion::AutoComplete()
return true;
}
// We are pressing TAB again on the same text.
/* We are pressing TAB again on the same text. */
if (this->current_suggestion_index + 1 < this->suggestions.size()) {
this->ApplySuggestion(prefix, this->suggestions[++this->current_suggestion_index]);
} else {
// We are out of options, restore original text.
/* We are out of options, restore original text. */
this->textbuf->Assign(initial_buf);
this->Reset();
}