Skip to content

use std::vector instead of std::list; why would you use a linked list?#27

Merged
ebcq merged 1 commit intocppdiscord:mainfrom
xNoerPlaysCodes:refactor/use-vector-instead-of-linked-list
May 5, 2026
Merged

use std::vector instead of std::list; why would you use a linked list?#27
ebcq merged 1 commit intocppdiscord:mainfrom
xNoerPlaysCodes:refactor/use-vector-instead-of-linked-list

Conversation

@xNoerPlaysCodes
Copy link
Copy Markdown
Contributor

Use a std::vector instead of a std::list; There is no real reason to use std::list instead of std::vector for the purpose of simply a constant storage of commands; Vector might even improve cache locality & speed.

Copy link
Copy Markdown
Contributor

@ebcq ebcq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Using std::list definitely makes no sense here.

@ebcq ebcq merged commit 829fbc0 into cppdiscord:main May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants