mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 14:57:35 +00:00
Userland: Don't explicitly call Vector<T>::is_null()
This method always returns false so there's no reason for calling it.
This commit is contained in:
parent
24ca645f08
commit
c4d0b0cd6b
2 changed files with 20 additions and 22 deletions
|
@ -23,7 +23,7 @@ void BarsVisualizationWidget::paint_event(GUI::PaintEvent& event)
|
||||||
painter.add_clip_rect(event.rect());
|
painter.add_clip_rect(event.rect());
|
||||||
painter.fill_rect(frame_inner_rect(), Color::Black);
|
painter.fill_rect(frame_inner_rect(), Color::Black);
|
||||||
|
|
||||||
if (m_sample_buffer.is_null() || m_sample_buffer.is_empty())
|
if (m_sample_buffer.is_empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fft(m_sample_buffer, false);
|
fft(m_sample_buffer, false);
|
||||||
|
|
|
@ -99,7 +99,6 @@ SuggestionManager::CompletionAttemptResult SuggestionManager::attempt_completion
|
||||||
|
|
||||||
if (m_next_suggestion_index < m_suggestions.size()) {
|
if (m_next_suggestion_index < m_suggestions.size()) {
|
||||||
auto can_complete = m_next_suggestion_invariant_offset <= m_largest_common_suggestion_prefix_length;
|
auto can_complete = m_next_suggestion_invariant_offset <= m_largest_common_suggestion_prefix_length;
|
||||||
if (!m_last_shown_suggestion.text.is_null()) {
|
|
||||||
ssize_t actual_offset;
|
ssize_t actual_offset;
|
||||||
size_t shown_length = m_last_shown_suggestion_display_length;
|
size_t shown_length = m_last_shown_suggestion_display_length;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
@ -121,7 +120,6 @@ SuggestionManager::CompletionAttemptResult SuggestionManager::attempt_completion
|
||||||
|
|
||||||
result.offset_region_to_remove = { m_next_suggestion_invariant_offset, shown_length };
|
result.offset_region_to_remove = { m_next_suggestion_invariant_offset, shown_length };
|
||||||
result.new_cursor_offset = actual_offset;
|
result.new_cursor_offset = actual_offset;
|
||||||
}
|
|
||||||
|
|
||||||
auto& suggestion = suggest();
|
auto& suggestion = suggest();
|
||||||
set_current_suggestion_initiation_index(initiation_start_index);
|
set_current_suggestion_initiation_index(initiation_start_index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue