Skip to content

Refactor: Unify vector declaration style in files with 'using namespace std" #1773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

codeberg-user
Copy link

  • Standardize vector declarations to either vector or std::vector per-file
  • For each file containing 'using namespace std':
    • Analyze existing usage patterns of std types
    • Convert all vector declarations to match the prevalent style:
      • Use unqualified vector if majority usage omits std::
      • Use fully qualified std::vector if majority explicitly scopes types
  • Maintains internal consistency within each file
  • Preserves existing coding patterns and style preferences
  • No functional changes - purely stylistic refactoring

@github-actions github-actions bot added VT: Backend Virtual Terminal Backend (libterminal API) frontend Contour Terminal Emulator (GUI frontend) VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library labels Jun 21, 2025
Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

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

Hey @cy-by-side.

Many thanks for your contribution. I don't mind either way in .cpp files. I just wonder why you've picked sometimes one way, and sometimes another.

@christianparpart christianparpart added the no changelog Tells the CI to not require a changelog entry label Jun 21, 2025
Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

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

Many thanks, @pelicans5 :)

…ce std'

- Standardize vector declarations to either `vector` or `std::vector` per-file
- For each file containing 'using namespace std':
  - Analyze existing usage patterns of std types
  - Convert all vector declarations to match the prevalent style:
    * Use unqualified `vector` if majority usage omits std::
    * Use fully qualified `std::vector` if majority explicitly scopes types
- Maintains internal consistency within each file
- Preserves existing coding patterns and style preferences
- No functional changes - purely stylistic refactoring
@christianparpart christianparpart merged commit 4332deb into contour-terminal:master Jul 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Contour Terminal Emulator (GUI frontend) no changelog Tells the CI to not require a changelog entry VT: Backend Virtual Terminal Backend (libterminal API) VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants