diff options
author | 2019-09-10 16:57:47 -0700 | |
---|---|---|
committer | 2019-09-10 16:57:47 -0700 | |
commit | f182366aaf66a770715b144ac0a760a998f59ed4 (patch) | |
tree | 285456dee69c55956a89c24c99ebd1f1111d80c3 /Source/main.cpp | |
parent | 51996901584e48ffb8fbcf719c8a1db851b21ac5 (diff) | |
download | WarpX-f182366aaf66a770715b144ac0a760a998f59ed4.tar.gz WarpX-f182366aaf66a770715b144ac0a760a998f59ed4.tar.zst WarpX-f182366aaf66a770715b144ac0a760a998f59ed4.zip |
Cleanup: Include Order
A typical include order in C++ is:
- "module header" (local header)
- "own headers" (WarpX)
- <close library headers> (AMReX)
- <other third party headers> (e.g. omp)
- <stdlib headers>
This avoids that a "forgotten include" will silently compile
in some compilers and crash in others (because it will crash
in all).
References:
- https://llvm.org/docs/CodingStandards.html#include-style
- https://include-what-you-use.org
Diffstat (limited to 'Source/main.cpp')
-rw-r--r-- | Source/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/main.cpp b/Source/main.cpp index d89e89e47..d31268b12 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -1,13 +1,12 @@ - -#include <iostream> +#include <WarpX.H> +#include <WarpXUtil.H> #include <AMReX.H> #include <AMReX_ParmParse.H> #include <AMReX_BLProfiler.H> #include <AMReX_ParallelDescriptor.H> -#include <WarpX.H> -#include <WarpXUtil.H> +#include <iostream> using namespace amrex; |