Skip to content

common: kit: test: wsd: make isKitInProcess constexpr#15663

Closed
aregnak wants to merge 3 commits intoCollaboraOnline:mainfrom
aregnak:inproc
Closed

common: kit: test: wsd: make isKitInProcess constexpr#15663
aregnak wants to merge 3 commits intoCollaboraOnline:mainfrom
aregnak:inproc

Conversation

@aregnak
Copy link
Copy Markdown
Contributor

@aregnak aregnak commented Apr 26, 2026

Summary

The setKitInProcess function was only called with the true argument
in coolwsd-inproc.cpp, which is only compiled when ENABLE_DEBUG is true.
Similarly, setKitInProcess was always called with false argument from
coolwsd-fork.cpp.

Since these are compile time invariants, create ENABLE_INPROC compiler
directive when ENABLE_DEBUG is true in Makefile.am, and convert isKitInProcess
into a constexpr function that returns true if ENABLE_INPROC, and simplify its
implementation.

Also, remove setKitInProcess and kitInProcess, and convert all conditionals
on isKitInProcess constexpr where applicable.

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay

aregnak added 3 commits April 26, 2026 14:33
The setKitInProcess function was only called with the true argument
in coolwsd-inproc.cpp, which is only compiled when ENABLE_DEBUG is true.
Similarly, setKitInProcess was always called with false argument from
coolwsd-fork.cpp.

Since these are compile time invariants, create ENABLE_INPROC compiler
directive when ENABLE_DEBUG is true in Makefile.am, and convert isKitInProcess
into a constexpr function that returns true if ENABLE_INPROC, and simplify its
implementation. Also, remove setKitInProcess and kitInProcess.

Signed-off-by: Areg Nakashian <areg.nakashian@gmail.com>
Change-Id: Ic1744cad1c3d06bacba4298daa9132ac5bb9c892
Signed-off-by: Areg Nakashian <areg.nakashian@gmail.com>
Change-Id: Icdff5fe5534dc14df2c9955a45794fa65090793d
Signed-off-by: Areg Nakashian <areg.nakashian@gmail.com>
Change-Id: I303524d9c2b4b12fba06e3bbbd64eb052f45dbdd
@github-actions
Copy link
Copy Markdown

Thank you for your contribution! However, the main branch on GitHub is not used for this project. Please submit patches to the main branch of the online repo at https://gerrit.collaboraoffice.com.

See CONTRIBUTING.md for details. This PR has been automatically closed.

@github-actions github-actions Bot closed this Apr 26, 2026
@github-project-automation github-project-automation Bot moved this from To Review to Done in Collabora Online Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant