Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/dev/clang-tidy-fixes-2026-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
- [PR #745](https://github.com/Framework-R-D/phlex/pull/745)
- [x] [modernize-avoid-c-style-cast](https://clang.llvm.org/extra/clang-tidy/checks/modernize/avoid-c-style-cast.html) (82)
- [PR #771](https://github.com/Framework-R-D/phlex/pull/771)
- [ ] [modernize-concat-nested-namespaces](https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html) (1)
- [x] [modernize-concat-nested-namespaces](https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html) (1)
- [PR #804](https://github.com/Framework-R-D/phlex/pull/804)
- [x] [modernize-make-shared](https://clang.llvm.org/extra/clang-tidy/checks/modernize/make-shared.html) (1)
- [PR #746](https://github.com/Framework-R-D/phlex/pull/746)
- [x] [modernize-pass-by-value](https://clang.llvm.org/extra/clang-tidy/checks/modernize/pass-by-value.html) (13)
Expand Down
35 changes: 16 additions & 19 deletions form/form/technology.hpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
#ifndef FORM_FORM_TECHNOLOGY_HPP
#define FORM_FORM_TECHNOLOGY_HPP

namespace form {
namespace technology {
// Helper constants - make these constexpr too
constexpr int ROOT_MAJOR = 1;
constexpr int ROOT_TTREE_MINOR = 1;
constexpr int ROOT_RNTUPLE_MINOR = 2;
constexpr int HDF5_MAJOR = 2;
namespace form::technology {
// Helper constants - make these constexpr too
constexpr int ROOT_MAJOR = 1;
constexpr int ROOT_TTREE_MINOR = 1;
constexpr int ROOT_RNTUPLE_MINOR = 2;
constexpr int HDF5_MAJOR = 2;

// Helper function for combining major/minor
constexpr int Combine(int major, int minor) { return (major * 256) + minor; }
// Helper function for combining major/minor
constexpr int Combine(int major, int minor) { return (major * 256) + minor; }

// Technology constants using the helper
constexpr int ROOT_TTREE = Combine(ROOT_MAJOR, ROOT_TTREE_MINOR);
constexpr int ROOT_RNTUPLE = Combine(ROOT_MAJOR, ROOT_RNTUPLE_MINOR);
constexpr int HDF5 = Combine(HDF5_MAJOR, 1);
// Technology constants using the helper
constexpr int ROOT_TTREE = Combine(ROOT_MAJOR, ROOT_TTREE_MINOR);
constexpr int ROOT_RNTUPLE = Combine(ROOT_MAJOR, ROOT_RNTUPLE_MINOR);
constexpr int HDF5 = Combine(HDF5_MAJOR, 1);

// Helper functions
inline int GetMajor(int tech) { return tech / 256; }
inline int GetMinor(int tech) { return tech % 256; }
}

} // namespace form
// Helper functions
inline int GetMajor(int tech) { return tech / 256; }
inline int GetMinor(int tech) { return tech % 256; }
} // namespace form::technology

#endif // FORM_FORM_TECHNOLOGY_HPP
Loading