diff options
-rw-r--r-- | include/cru/base/StringUtil.h | 33 | ||||
-rw-r--r-- | include/cru/platform/Resource.h | 2 | ||||
-rw-r--r-- | include/cru/platform/graphics/NullPainter.h | 3 | ||||
-rw-r--r-- | src/platform/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/platform/Resource.cpp | 5 |
5 files changed, 27 insertions, 17 deletions
diff --git a/include/cru/base/StringUtil.h b/include/cru/base/StringUtil.h index a69bb884..1496f9cd 100644 --- a/include/cru/base/StringUtil.h +++ b/include/cru/base/StringUtil.h @@ -16,12 +16,12 @@ #include <vector> namespace cru::string { -std::weak_ordering CaseInsensitiveCompare(std::string_view left, - std::string_view right); -std::string TrimBegin(std::string_view str); -std::string TrimEnd(std::string_view str); -std::string Trim(std::string_view str); -bool IsSpace(std::string_view str); +std::weak_ordering CRU_BASE_API CaseInsensitiveCompare(std::string_view left, + std::string_view right); +std::string CRU_BASE_API TrimBegin(std::string_view str); +std::string CRU_BASE_API TrimEnd(std::string_view str); +std::string CRU_BASE_API Trim(std::string_view str); +bool CRU_BASE_API IsSpace(std::string_view str); namespace details { struct SplitOptionsTag {}; @@ -32,8 +32,9 @@ struct SplitOptions { static constexpr SplitOption RemoveSpace = SplitOption::FromOffset(2); }; -std::vector<std::string> Split(std::string_view str, std::string_view sep, - SplitOption options = {}); +std::vector<std::string> CRU_BASE_API Split(std::string_view str, + std::string_view sep, + SplitOption options = {}); namespace details { struct ParseToNumberFlagTag {}; @@ -376,13 +377,17 @@ using Utf8CodePointIterator = CodePointIterator<char, &Utf8NextCodePoint>; using Utf16CodePointIterator = CodePointIterator<Utf16CodeUnit, &Utf16NextCodePoint>; -Index Utf8IndexCodeUnitToCodePoint(const Utf8CodeUnit* ptr, Index size, Index position); -Index Utf8IndexCodePointToCodeUnit(const Utf8CodeUnit* ptr, Index size, Index position); -Index Utf16IndexCodeUnitToCodePoint(const Utf16CodeUnit* ptr, Index size, Index position); -Index Utf16IndexCodePointToCodeUnit(const Utf16CodeUnit* ptr, Index size, Index position); +Index CRU_BASE_API Utf8IndexCodeUnitToCodePoint(const Utf8CodeUnit* ptr, Index size, + Index position); +Index CRU_BASE_API Utf8IndexCodePointToCodeUnit(const Utf8CodeUnit* ptr, Index size, + Index position); +Index CRU_BASE_API Utf16IndexCodeUnitToCodePoint(const Utf16CodeUnit* ptr, Index size, + Index position); +Index CRU_BASE_API Utf16IndexCodePointToCodeUnit(const Utf16CodeUnit* ptr, Index size, + Index position); #ifdef _WIN32 -std::wstring ToUtf16(std::string_view str); -std::string ToUtf8(std::wstring_view str); +std::wstring CRU_BASE_API ToUtf16(std::string_view str); +std::string CRU_BASE_API ToUtf8(std::wstring_view str); #endif } // namespace cru::string diff --git a/include/cru/platform/Resource.h b/include/cru/platform/Resource.h index 35a401be..d49e9bab 100644 --- a/include/cru/platform/Resource.h +++ b/include/cru/platform/Resource.h @@ -8,6 +8,6 @@ namespace cru::platform { struct CRU_PLATFORM_API IPlatformResource : virtual Interface { virtual std::string GetPlatformId() const = 0; - virtual std::string GetDebugString() { return {}; } + virtual std::string GetDebugString(); }; } // namespace cru::platform diff --git a/include/cru/platform/graphics/NullPainter.h b/include/cru/platform/graphics/NullPainter.h index 74d71c16..42c2763e 100644 --- a/include/cru/platform/graphics/NullPainter.h +++ b/include/cru/platform/graphics/NullPainter.h @@ -3,8 +3,7 @@ #include "cru/base/Base.h" namespace cru::platform::graphics { -class CRU_PLATFORM_GRAPHICS_API NullPainter : public Object, - public virtual IPainter { +class NullPainter : public Object, public virtual IPainter { public: NullPainter() = default; diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt index 9122e499..a917f81f 100644 --- a/src/platform/CMakeLists.txt +++ b/src/platform/CMakeLists.txt @@ -2,6 +2,7 @@ add_library(CruPlatformBase Color.cpp Exception.cpp GraphicsBase.cpp + Resource.cpp ) target_link_libraries(CruPlatformBase PUBLIC CruBase) target_compile_definitions(CruPlatformBase PRIVATE CRU_PLATFORM_EXPORT_API) diff --git a/src/platform/Resource.cpp b/src/platform/Resource.cpp new file mode 100644 index 00000000..b530bd0c --- /dev/null +++ b/src/platform/Resource.cpp @@ -0,0 +1,5 @@ +#include "cru/platform/Resource.h" + +namespace cru::platform { +std::string IPlatformResource::GetDebugString() { return {}; } +} // namespace cru::platform |