diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-31 17:55:14 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-31 17:55:14 +0300 |
commit | 3060b98842fe1b1bca6cce6678ee8a022583e63f (patch) | |
tree | e1f700ec7a92be0e6909ef450ee2d837f6f65f7a /source/blender/blenlib/BLI_math_mpq.hh | |
parent | a746cef82526528e6037ba205b49ad8c883a0b91 (diff) |
Cleanup: Simplify dependencies for GMP math header
Previously, the base math headers included GMP headers in all cases.
This was problematic because we don't want all modules that use the
math headers to depend on GMP, and the unnecessary includes could
theoretically have detrimental effects to compile times.
Now `BLI_math_mpq.hh` depends on `BLI_math_base.hh`, so if a file
needs to use exact arithmatic, it can just include the former.
Differential Revision: https://developer.blender.org/D15079
Diffstat (limited to 'source/blender/blenlib/BLI_math_mpq.hh')
-rw-r--r-- | source/blender/blenlib/BLI_math_mpq.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_mpq.hh b/source/blender/blenlib/BLI_math_mpq.hh index 7b43c90da84..02c92705323 100644 --- a/source/blender/blenlib/BLI_math_mpq.hh +++ b/source/blender/blenlib/BLI_math_mpq.hh @@ -19,4 +19,10 @@ */ # include "gmpxx.h" +# include "BLI_math_base.hh" + +namespace blender::math { +template<> inline constexpr bool is_math_float_type<mpq_class> = true; +} + #endif /* WITH_GMP */ |