mirror of
https://github.com/RGBCube/serenity
synced 2025-06-29 01:42:11 +00:00
LibGUI: Convert always-valid pointer to reference
The pointer is always assumed to be non-null, so let's change it to a reference.
This commit is contained in:
parent
5910a41adb
commit
2f023acf78
4 changed files with 46 additions and 46 deletions
|
@ -990,20 +990,20 @@ void TextEditor::reset_cursor_blink()
|
|||
|
||||
void TextEditor::update_selection(bool is_selecting)
|
||||
{
|
||||
if (is_selecting && !selection()->is_valid()) {
|
||||
selection()->set(cursor(), {});
|
||||
if (is_selecting && !selection().is_valid()) {
|
||||
selection().set(cursor(), {});
|
||||
did_update_selection();
|
||||
update();
|
||||
return;
|
||||
}
|
||||
if (!is_selecting && selection()->is_valid()) {
|
||||
selection()->clear();
|
||||
if (!is_selecting && selection().is_valid()) {
|
||||
selection().clear();
|
||||
did_update_selection();
|
||||
update();
|
||||
return;
|
||||
}
|
||||
if (is_selecting && selection()->start().is_valid()) {
|
||||
selection()->set_end(cursor());
|
||||
if (is_selecting && selection().start().is_valid()) {
|
||||
selection().set_end(cursor());
|
||||
did_update_selection();
|
||||
update();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue