Use brace initialization instead of copy initialization

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

The issue names no files or tests, so first locate all C-style copy initialisations across the course repository and review the linked C++ Core Guideline. Replace the applicable uses with uniform brace initialisation throughout the codebase, then verify that the project still builds and its existing checks pass.

Written by the indexing model from the issue text.

Description

@mmcleod89 Let us systematically replace all uses of C-style copy initialisations with uniform brace initialisation. This is a best practice that will prevent narrowing conversions.

See this C++ core guideline here for more explanation from Stroustrup: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-list

Dominant language
Ruby
Stars
31
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UCL/research-computing-with-cpp

All issues in UCL/research-computing-with-cpp

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.