mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Terminal: Convert Vector<OwnPtr> to NonnullOwnPtrVector.
This commit is contained in:
parent
1686c4906b
commit
31a2a6ca2d
Notes:
sideshowbarker
2024-07-19 13:04:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/31a2a6ca2d7
2 changed files with 7 additions and 7 deletions
|
@ -930,11 +930,11 @@ void Terminal::set_size(u16 columns, u16 rows)
|
|||
while (m_lines.size() < rows)
|
||||
m_lines.append(make<Line>(columns));
|
||||
} else {
|
||||
m_lines.resize(rows);
|
||||
m_lines.shrink(rows);
|
||||
}
|
||||
|
||||
for (int i = 0; i < rows; ++i)
|
||||
m_lines[i]->set_length(columns);
|
||||
m_lines[i].set_length(columns);
|
||||
|
||||
m_columns = columns;
|
||||
m_rows = rows;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/CConfigFile.h>
|
||||
#include <LibCore/CNotifier.h>
|
||||
#include <LibCore/CTimer.h>
|
||||
#include <LibGUI/GFrame.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
#include <LibGUI/GFrame.h>
|
||||
|
||||
class Font;
|
||||
|
||||
|
@ -193,15 +193,15 @@ private:
|
|||
Line& line(size_t index)
|
||||
{
|
||||
ASSERT(index < m_rows);
|
||||
return *m_lines[index];
|
||||
return m_lines[index];
|
||||
}
|
||||
const Line& line(size_t index) const
|
||||
{
|
||||
ASSERT(index < m_rows);
|
||||
return *m_lines[index];
|
||||
return m_lines[index];
|
||||
}
|
||||
|
||||
Vector<OwnPtr<Line>> m_lines;
|
||||
NonnullOwnPtrVector<Line> m_lines;
|
||||
|
||||
BufferPosition m_selection_start;
|
||||
BufferPosition m_selection_end;
|
||||
|
|
Loading…
Reference in a new issue