dr4kan / EcoMug

Efficient COsmic MUon Generator
GNU General Public License v3.0
17 stars 6 forks source link

Fix compilation errors and C++-style fixes #2

Closed zhao-shihan closed 1 year ago

zhao-shihan commented 1 year ago

Compilation issues:

  1. M_PI is a non-standard feature. Standard C++ library does not guarantee M_PI definition. As a header-only library, this corner case should be covered.
  2. Bare cout and endl are not available unless there is a using namespace std. Add std:: before both of them to fix this issue.
  3. std::cout and std::endl are not available unless iostream is included.

Potential issues and C++ style fixing:

  1. Include cmath instead of math.h.
  2. C++ integer type aliases should have std:: qualification. Bare uint64_t, size_t and etc. is C-styled code, not C++.
dr4kan commented 1 year ago

Merging fix for compilation issues