Skip to content

Commit

Permalink
fix clang-tidy again
Browse files Browse the repository at this point in the history
  • Loading branch information
YanzhaoW committed Jan 9, 2024
1 parent a2b3d1a commit bbd8f47
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def install_conan_packages(self):
f"--settings=build_type={self.args.build_type}",
],
check=True,
)
) # nosec

def cmake_configure(self):
if self.args.is_only_configure or self.args.is_all:
Expand All @@ -119,13 +119,13 @@ def cmake_configure(self):
extra_args = self.args.cmake_args.split(";")
cmake_args.extend(extra_args)
print(f"build.py: cmake {cmake_args}")
subprocess.run(["cmake"] + cmake_args, check=True)
subprocess.run(["cmake"] + cmake_args, check=True) # nosec

def build_source(self):
if self.args.is_only_build or self.args.is_all:
subprocess.run(
["cmake", "--build", self.args.build_dir, "--", "-j", str(self.args.build_thread)], check=True
)
) # nosec


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion neuland/calibration/legacy/R3BNeulandTSyncer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ namespace R3B::Neuland // NOLINT
auto nEQ = 0;
for (UInt_t id = 0; id < Data.size(); ++id)
{
const auto plane = GetPlaneID(id);
const auto plane = GetPlaneID(static_cast<int>(id));
if (!std::isnan(Data[id].TSyncNextBar.Value))
{
const auto weight = 1. / Data[id].TSyncNextBar.Error;
Expand Down
7 changes: 3 additions & 4 deletions neuland/calibration/share/R3BNeulandParDirCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ namespace R3B::Neuland
~ParDirCreator() noexcept { old_dir_->cd(); }
ParDirCreator(const ParDirCreator&) = delete;
ParDirCreator(ParDirCreator&&) = delete;
ParDirCreator& operator=(const ParDirCreator&) = delete;
ParDirCreator& operator=(ParDirCreator&&) = delete;
auto operator=(const ParDirCreator&) -> ParDirCreator& = delete;
auto operator=(ParDirCreator&&) -> ParDirCreator& = delete;

auto* mkdir(std::string_view dir_name)
auto mkdir(std::string_view dir_name) -> auto*
{

if (par_root_file_->IsZombie())
{
throw R3B::runtime_error(
Expand Down
8 changes: 4 additions & 4 deletions neuland/shared/R3BNeulandCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ namespace R3B::Neuland
constexpr auto MaxNumberOfPlanes = 26;
constexpr auto MaxNumberOfBars = MaxNumberOfPlanes * BarsPerPlane;

inline constexpr auto IsPlaneHorizontal(const int plane) -> bool { return (plane % 2 == FirstHorizontalPlane); }
inline constexpr auto IsPlaneVertical(const int plane) -> bool { return !IsPlaneHorizontal(plane); }
inline constexpr auto GetPlaneID(const int moduleID) -> int { return moduleID / BarsPerPlane; }
inline constexpr auto GetPlaneNum(const int moduleID) -> int { return GetPlaneID(moduleID) + 1; }
inline constexpr auto IsPlaneHorizontal(int plane) -> bool { return (plane % 2 == FirstHorizontalPlane); }
inline constexpr auto IsPlaneVertical(int plane) -> bool { return !IsPlaneHorizontal(plane); }
inline constexpr auto GetPlaneID(int moduleID) -> int { return moduleID / BarsPerPlane; }
inline constexpr auto GetPlaneNum(int moduleID) -> int { return GetPlaneID(moduleID) + 1; }
// planeNum, barNum and ModuleNum is 1-based
inline constexpr auto Neuland_PlaneBar2ModuleNum(unsigned int planeNum, unsigned int barNum) -> unsigned int
{
Expand Down

0 comments on commit bbd8f47

Please sign in to comment.