diff --git a/.clang-format b/.clang-format index 810fb26..aae82ca 100644 --- a/.clang-format +++ b/.clang-format @@ -34,4 +34,4 @@ BraceWrapping: IndentBraces: false CommentPragmas: '/\*(.+\n.+)+\*/' -AttributeMacros: [KDFOUNDATION_API, KDGUI_API, KDUTILS_EXPORT] +AttributeMacros: [KDFOUNDATION_API, KDGUI_API, KDUTILS_API] diff --git a/src/KDUtils/bytearray.h b/src/KDUtils/bytearray.h index d212697..459f2f8 100644 --- a/src/KDUtils/bytearray.h +++ b/src/KDUtils/bytearray.h @@ -16,11 +16,11 @@ #include #include -#include +#include namespace KDUtils { -class KDUTILS_EXPORT ByteArray +class KDUTILS_API ByteArray { public: ByteArray(); @@ -69,9 +69,9 @@ class KDUTILS_EXPORT ByteArray std::vector m_data; }; -KDUTILS_EXPORT bool operator==(const ByteArray &a, const ByteArray &b); -KDUTILS_EXPORT bool operator!=(const ByteArray &a, const ByteArray &b); -KDUTILS_EXPORT ByteArray operator+(const ByteArray &a, const ByteArray &b); +KDUTILS_API bool operator==(const ByteArray &a, const ByteArray &b); +KDUTILS_API bool operator!=(const ByteArray &a, const ByteArray &b); +KDUTILS_API ByteArray operator+(const ByteArray &a, const ByteArray &b); } // namespace KDUtils diff --git a/src/KDUtils/dir.h b/src/KDUtils/dir.h index 2bfa001..1cf4a8a 100644 --- a/src/KDUtils/dir.h +++ b/src/KDUtils/dir.h @@ -12,13 +12,13 @@ #ifndef KDUTILS_DIR_H #define KDUTILS_DIR_H -#include +#include #include #include namespace KDUtils { -class KDUTILS_EXPORT Dir +class KDUTILS_API Dir { public: Dir(); diff --git a/src/KDUtils/elapsedtimer.h b/src/KDUtils/elapsedtimer.h index fe17a99..44beee7 100644 --- a/src/KDUtils/elapsedtimer.h +++ b/src/KDUtils/elapsedtimer.h @@ -12,13 +12,13 @@ #ifndef KDUTILS_ELAPSEDTIMER_H #define KDUTILS_ELAPSEDTIMER_H -#include +#include #include #include namespace KDUtils { -class KDUTILS_EXPORT ElapsedTimer +class KDUTILS_API ElapsedTimer { public: using Clock = std::chrono::high_resolution_clock; diff --git a/src/KDUtils/file.h b/src/KDUtils/file.h index 0809f0f..724bba4 100644 --- a/src/KDUtils/file.h +++ b/src/KDUtils/file.h @@ -11,7 +11,7 @@ #ifndef KDUTILS_FILE_H #define KDUTILS_FILE_H -#include +#include #include #include #include @@ -23,7 +23,7 @@ namespace KDUtils { -class KDUTILS_EXPORT File +class KDUTILS_API File { public: File(const std::string &path); @@ -60,7 +60,7 @@ class KDUTILS_EXPORT File }; #if defined(ANDROID) -KDUTILS_EXPORT void setAssetManager(AAssetManager *assetManager); +KDUTILS_API void setAssetManager(AAssetManager *assetManager); #endif } // namespace KDUtils diff --git a/src/KDUtils/file_mapper.h b/src/KDUtils/file_mapper.h index c252c3c..314b0fb 100644 --- a/src/KDUtils/file_mapper.h +++ b/src/KDUtils/file_mapper.h @@ -11,11 +11,11 @@ #ifndef KDUTILS_FILE_MAPPER_H #define KDUTILS_FILE_MAPPER_H #include -#include +#include namespace KDUtils { /// Provides memory mapping from a file. -class KDUTILS_EXPORT FileMapper +class KDUTILS_API FileMapper { public: struct Map; diff --git a/src/KDUtils/kdutils_global.h b/src/KDUtils/kdutils_global.h index 3f65649..7e7b674 100644 --- a/src/KDUtils/kdutils_global.h +++ b/src/KDUtils/kdutils_global.h @@ -11,4 +11,8 @@ #pragma once +#include + +#define KDUTILS_API KDUTILS_EXPORT + #define KD_UNUSED(x) (void)x; diff --git a/src/KDUtils/logging.h b/src/KDUtils/logging.h index 1eb02af..cf4c9af 100644 --- a/src/KDUtils/logging.h +++ b/src/KDUtils/logging.h @@ -10,7 +10,7 @@ #pragma once -#include +#include #include #include @@ -19,7 +19,7 @@ namespace KDUtils { -class KDUTILS_EXPORT Logger +class KDUTILS_API Logger { public: static std::shared_ptr logger(const std::string &name, spdlog::level::level_enum defaultLevel = spdlog::level::warn); diff --git a/src/KDUtils/url.cpp b/src/KDUtils/url.cpp index d7fdac4..c9c081b 100644 --- a/src/KDUtils/url.cpp +++ b/src/KDUtils/url.cpp @@ -78,12 +78,12 @@ Url Url::fromLocalFile(const std::string &url) return Url(std::string("file://") + path); } -KDUTILS_EXPORT bool operator==(const Url &a, const Url &b) +bool operator==(const Url &a, const Url &b) { return a.url() == b.url(); } -KDUTILS_EXPORT bool operator!=(const Url &a, const Url &b) +bool operator!=(const Url &a, const Url &b) { return !(a == b); } diff --git a/src/KDUtils/url.h b/src/KDUtils/url.h index 4a2f3ed..0fd8a3a 100644 --- a/src/KDUtils/url.h +++ b/src/KDUtils/url.h @@ -12,12 +12,12 @@ #ifndef KDUTILS_URL_H #define KDUTILS_URL_H -#include +#include #include namespace KDUtils { -class KDUTILS_EXPORT Url +class KDUTILS_API Url { public: Url() = default; @@ -41,8 +41,8 @@ class KDUTILS_EXPORT Url std::string m_path; }; -KDUTILS_EXPORT bool operator==(const Url &a, const Url &b); -KDUTILS_EXPORT bool operator!=(const Url &a, const Url &b); +KDUTILS_API bool operator==(const Url &a, const Url &b); +KDUTILS_API bool operator!=(const Url &a, const Url &b); } // namespace KDUtils