diff --git a/src/myx/base/config.cpp b/src/myx/base/config.cpp index ada0f9c..228b77c 100644 --- a/src/myx/base/config.cpp +++ b/src/myx/base/config.cpp @@ -2,4 +2,4 @@ #error Define MYXLIB_BUILD_LIBRARIES to compile this file. #endif -#include "config.hpp" +#include diff --git a/src/myx/base/config.hpp b/src/myx/base/config.hpp index bd755ae..3a32591 100644 --- a/src/myx/base/config.hpp +++ b/src/myx/base/config.hpp @@ -5,9 +5,20 @@ #ifdef MYXLIB_BUILD_LIBRARIES #undef MYXLIB_HEADER_ONLY + +#if defined( _WIN32 ) && defined( MYXLIB_SHARED_LIB ) +#ifdef myxlib_EXPORTS +#define MYXLIB_API __declspec( dllexport ) +#else +#define MYXLIB_API __declspec( dllimport ) +#endif +#else +#define MYXLIB_API +#endif #define MYXLIB_INLINE inline #else #define MYXLIB_HEADER_ONLY +#define MYXLIB_API #define MYXLIB_INLINE inline #endif diff --git a/src/myx/math/almost_equal_relative-inl.hpp b/src/myx/math/almost_equal_relative-inl.hpp index ab41af9..c9869ca 100644 --- a/src/myx/math/almost_equal_relative-inl.hpp +++ b/src/myx/math/almost_equal_relative-inl.hpp @@ -14,7 +14,7 @@ namespace myx { namespace math { MYXLIB_INLINE bool almost_equal_relative( const float a, const float b, - const float maxRelDiff ) + const float maxRelDiff ) { float diff = fabsf( a - b ); float aN = fabsf( a ); @@ -30,7 +30,7 @@ MYXLIB_INLINE bool almost_equal_relative( const float a, const float b, MYXLIB_INLINE bool almost_equal_relative( const double a, const double b, - const double maxRelDiff ) + const double maxRelDiff ) { double diff = fabs( a - b ); double aN = fabs( a ); @@ -48,4 +48,4 @@ MYXLIB_INLINE bool almost_equal_relative( const double a, const double b, } // namespace myx -#endif +#endif // ifndef MYX_MATH_ALMOST_EQUAL_RELATIVE_INL_HPP_ diff --git a/src/myx/math/almost_equal_relative_and_abs-inl.hpp b/src/myx/math/almost_equal_relative_and_abs-inl.hpp index a3eb720..9d8b176 100644 --- a/src/myx/math/almost_equal_relative_and_abs-inl.hpp +++ b/src/myx/math/almost_equal_relative_and_abs-inl.hpp @@ -14,7 +14,7 @@ namespace myx { namespace math { MYXLIB_INLINE bool almost_equal_relative_and_abs( const float a, const float b, - const float maxAbsDiff, const float maxRelDiff ) + const float maxAbsDiff, const float maxRelDiff ) { // Check if the numbers are really close -- needed // when comparing numbers near zero. @@ -37,7 +37,7 @@ MYXLIB_INLINE bool almost_equal_relative_and_abs( const float a, const float b, MYXLIB_INLINE bool almost_equal_relative_and_abs( const double a, const double b, - const double maxAbsDiff, const double maxRelDiff ) + const double maxAbsDiff, const double maxRelDiff ) { // Check if the numbers are really close -- needed // when comparing numbers near zero. @@ -62,4 +62,4 @@ MYXLIB_INLINE bool almost_equal_relative_and_abs( const double a, const double b } // namespace myx -#endif +#endif // ifndef MYX_MATH_ALMOST_EQUAL_RELATIVE_AND_ABS_INL_HPP_ diff --git a/src/myx/math/almost_equal_ulps-inl.hpp b/src/myx/math/almost_equal_ulps-inl.hpp index 540d8bb..288b4f4 100644 --- a/src/myx/math/almost_equal_ulps-inl.hpp +++ b/src/myx/math/almost_equal_ulps-inl.hpp @@ -16,7 +16,7 @@ namespace myx { namespace math { MYXLIB_INLINE bool almost_equal_ulps( const float a, const float b, - const int maxUlpsDiff ) + const int maxUlpsDiff ) { FloatCmp uA( a ); FloatCmp uB( b ); @@ -52,7 +52,7 @@ MYXLIB_INLINE bool almost_equal_ulps( const float a, const float b, MYXLIB_INLINE bool almost_equal_ulps( const double a, const double b, - const int maxUlpsDiff ) + const int maxUlpsDiff ) { DoubleCmp uA( a ); DoubleCmp uB( b ); @@ -90,4 +90,4 @@ MYXLIB_INLINE bool almost_equal_ulps( const double a, const double b, } // namespace myx -#endif +#endif // ifndef MYX_MATH_ALMOST_EQUAL_ULPS_INL_HPP_ diff --git a/src/myx/math/almost_equal_ulps_and_abs-inl.hpp b/src/myx/math/almost_equal_ulps_and_abs-inl.hpp index a8b59a2..4df204a 100644 --- a/src/myx/math/almost_equal_ulps_and_abs-inl.hpp +++ b/src/myx/math/almost_equal_ulps_and_abs-inl.hpp @@ -16,7 +16,7 @@ namespace myx { namespace math { MYXLIB_INLINE bool almost_equal_ulps_and_abs( const float a, const float b, - const float maxAbsDiff, const int maxUlpsDiff ) + const float maxAbsDiff, const int maxUlpsDiff ) { // Check if the numbers are really close -- needed // when comparing numbers near zero. @@ -49,7 +49,7 @@ MYXLIB_INLINE bool almost_equal_ulps_and_abs( const float a, const float b, MYXLIB_INLINE bool almost_equal_ulps_and_abs( const double a, const double b, - const double maxAbsDiff, const int maxUlpsDiff ) + const double maxAbsDiff, const int maxUlpsDiff ) { // Check if the numbers are really close -- needed // when comparing numbers near zero. @@ -84,4 +84,4 @@ MYXLIB_INLINE bool almost_equal_ulps_and_abs( const double a, const double b, } // namespace myx -#endif +#endif // ifndef MYX_MATH_ALMOST_EQUAL_ULPS_INL_HPP_ diff --git a/src/myx/math/constants-inl.hpp b/src/myx/math/constants-inl.hpp index 39b5ced..18eb857 100644 --- a/src/myx/math/constants-inl.hpp +++ b/src/myx/math/constants-inl.hpp @@ -15,4 +15,4 @@ namespace math { } // namespace myx -#endif +#endif // ifndef MYX_MATH_CONSTANTS_INL_HPP_ diff --git a/src/myx/math/constants.hpp b/src/myx/math/constants.hpp index 7db7521..f601213 100644 --- a/src/myx/math/constants.hpp +++ b/src/myx/math/constants.hpp @@ -12,7 +12,7 @@ namespace myx { namespace math { -const auto ImpedanceOfFreeSpace = (M_PI * 119.9169832); +const auto ImpedanceOfFreeSpace = ( M_PI * 119.9169832 ); } // namespace math diff --git a/src/myx/qt/CMakeLists.txt b/src/myx/qt/CMakeLists.txt index d908917..9cf5db2 100644 --- a/src/myx/qt/CMakeLists.txt +++ b/src/myx/qt/CMakeLists.txt @@ -3,10 +3,8 @@ set(TRGT qt) # cmake-format: off # Список файлов исходных текстов -if(NOT MYXLIB_HEADER_ONLY) set(TRGT_cpp ${CMAKE_CURRENT_SOURCE_DIR}/translators.cpp) -endif() # Список заголовочных файлов (используется для установки) set(TRGT_hpp diff --git a/src/myx/qt/translators-inl.hpp b/src/myx/qt/translators-inl.hpp index 9367945..9c25a27 100644 --- a/src/myx/qt/translators-inl.hpp +++ b/src/myx/qt/translators-inl.hpp @@ -3,12 +3,12 @@ #pragma once +#include + #ifndef MYXLIB_HEADER_ONLY #include #endif -#include - #include #include #include diff --git a/src/myx/qt/translators.cpp b/src/myx/qt/translators.cpp index 496aac7..0ecf745 100644 --- a/src/myx/qt/translators.cpp +++ b/src/myx/qt/translators.cpp @@ -2,4 +2,4 @@ #error Define MYXLIB_BUILD_LIBRARIES to compile this file. #endif -#include +#include