Skip to content

Commit

Permalink
refactor: modern include-guard
Browse files Browse the repository at this point in the history
  • Loading branch information
motchy869 committed Aug 30, 2021
1 parent fb07183 commit 39293da
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Added `MATH_LIB_INLINE_AGGRESSIVELY` option.
- Speeded up following functions:
- `Analysis::`
- `sqAbs`
- `LinAlg::`
- `innerProd`, `vecSelfOuterProd`, `mulMat`, `ldlDecomp`, `solveLinearEquation`, `solveLinEqHermitian`, `hermitianInnerProduct`
- `SigProc::`
- `convolve`, `convolve_type2`
- Added `MATH_LIB_INLINE_AGGRESSIVELY` option.
- Improved include-guard: replaced old-style guard using `#ifndef` with `#pragma once`.

## [0.4.0] - 2021/8/27

Expand Down
5 changes: 1 addition & 4 deletions include/RlsFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* @author motchy (motchy869[at]gmail.com)
* @brief Recursive Least Square filter
*/
#ifndef __MATH_LIB__RLS_FILTER_HPP__
#define __MATH_LIB__RLS_FILTER_HPP__
#pragma once

#define ENVIRONMENT_STANDARD 0
#define ENVIRONMENT_TI_RTOS 1
Expand Down Expand Up @@ -189,5 +188,3 @@ namespace MathLib {
#undef ENVIRONMENT_STANDARD
#undef ENVIRONMENT_TI_RTOS
#undef ENVIRONMENT

#endif // __MATH_LIB__RLS_FILTER_HPP__
5 changes: 1 addition & 4 deletions include/analysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* @author motchy (motchy869[at]gmail.com)
* @brief Analysis library
*/
#ifndef __MATH_LIB__ANALYSIS_HPP__
#define __MATH_LIB__ANALYSIS_HPP__
#pragma once

#include <cmath>
#include <complex>
Expand Down Expand Up @@ -342,5 +341,3 @@ namespace MathLib {
#endif
}
}

#endif // __MATH_LIB__ANALYSIS_HPP__
4 changes: 1 addition & 3 deletions include/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
* @author motchy (motchy869[at]gmail.com)
* @brief common settings
*/
#ifndef __MATH_LIB_COMMON_HPP__
#define __MATH_LIB_COMMON_HPP__
#pragma once
#define MATH_LIB_ENABLE_BUG_HUNTING_MODE false
#define MATH_LIB_INLINE_AGGRESSIVELY true
#endif // __MATH_LIB_COMMON_HPP__

5 changes: 1 addition & 4 deletions include/linAlg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* @author motchy (motchy869[at]gmail.com)
* @brief Linear Algebra library
*/
#ifndef __MATH_LIB__LINALG_HPP__
#define __MATH_LIB__LINALG_HPP__
#pragma once

#include <cassert>
#include <cmath>
Expand Down Expand Up @@ -843,5 +842,3 @@ namespace MathLib {
}
}
}

#endif // __MATH_LIB__LINALG_HPP__
5 changes: 1 addition & 4 deletions include/sigProc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* @author motchy (motchy869[at]gmail.com)
* @brief Signal Processing library
*/
#ifndef __MATH_LIB__SIGPROC_HPP__
#define __MATH_LIB__SIGPROC_HPP__
#pragma once

#include <algorithm>
#include <cstddef>
Expand Down Expand Up @@ -160,5 +159,3 @@ namespace MathLib {
};
}
}

#endif // __MATH_LIB__SIGPROC_HPP__

0 comments on commit 39293da

Please sign in to comment.