Skip to content

core: fix header-only utility definitions - #27

Merged
antirotor merged 2 commits into
developfrom
fix-header-only-inline-functions
Oct 27, 2026
Merged

antirotor merged 2 commits into
developfrom
fix-header-only-inline-functions

Conversation

@tadeas-hejnic

@tadeas-hejnic tadeas-hejnic commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Changelog Description

Mark the utility functions in the header-only environment and root helper files as inline to prevent multiple-definition linker errors when the headers are included by multiple translation units. Also add the missing <sstream> include used by the environment helpers.

Additional info

This keeps the implementation header-only while making it safe for consumers that include these headers from more than one source file.

Testing notes:

  1. git diff --check
  2. CMake configure and build with optional components disabled
  3. Full dependency-backed build was not run because the repository submodules are empty.

Mark utility functions defined in headers as inline to avoid multiple-definition linker errors when included by multiple translation units. Also include sstream for the string stream helper.
@tadeas-hejnic tadeas-hejnic added the type: bug Something isn't working label Oct 6, 2026
@tadeas-hejnic tadeas-hejnic self-assigned this Oct 6, 2026
@tadeas-hejnic
tadeas-hejnic requested a lite review from Copilot October 6, 2026 15:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review issues remain.

Review effort: Lite
Findings: None

What changed in this PR

Updates header-only utilities to prevent multiple-definition linker errors and adds the missing stream include.

Changes:

  • Marks environment helpers and rootReplace as inline.
  • Adds <sstream> for std::stringstream.
File Description
src/​lib/​ynput/​tool/​ayon/​rootHelpers.hpp Makes rootReplace safe across translation units.
src/​lib/​ynput/​core/​iostd/​envVarHelpers.hpp Makes helpers inline and adds stream support.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tadeas-hejnic
tadeas-hejnic marked this pull request as ready for review October 6, 2026 15:14

@antirotor antirotor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks safe to merge

@antirotor
antirotor merged commit 894e427 into develop Oct 27, 2026
@antirotor
antirotor deleted the fix-header-only-inline-functions branch October 27, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants