mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
Sprinkle use of AK::Vector in various places.
Some of these are less helpful than others. Avoiding a bunch of mallocs in the event loop wakeup code is definitely nice.
This commit is contained in:
parent
7faf8fabf2
commit
5eedb22834
17 changed files with 53 additions and 50 deletions
|
@ -60,7 +60,7 @@ private:
|
|||
void handle_wm_event(const WSAPI_ServerMessage&, GWindow&);
|
||||
void connect_to_server();
|
||||
|
||||
Vector<WSAPI_ServerMessage> m_unprocessed_messages;
|
||||
Vector<WSAPI_ServerMessage, 64> m_unprocessed_messages;
|
||||
static pid_t s_server_pid;
|
||||
static pid_t s_event_fd;
|
||||
};
|
||||
|
|
|
@ -76,7 +76,7 @@ struct GFileSystemModel::Node {
|
|||
|
||||
String full_path(const GFileSystemModel& model) const
|
||||
{
|
||||
Vector<String> lineage;
|
||||
Vector<String, 32> lineage;
|
||||
for (auto* ancestor = parent; ancestor; ancestor = ancestor->parent) {
|
||||
lineage.append(ancestor->name);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ static String to_string(KeyCode key)
|
|||
|
||||
String GShortcut::to_string() const
|
||||
{
|
||||
Vector<String> parts;
|
||||
Vector<String, 8> parts;
|
||||
|
||||
if (m_modifiers & Mod_Ctrl)
|
||||
parts.append("Ctrl");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue