diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-13 19:17:09 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-13 19:17:09 +0200 |
| commit | 3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7 (patch) | |
| tree | 8d24babc8cd3d097800af0bd960c7ba1d72927d7 /src/zencore/include | |
| parent | use mimalloc by default (#952) (diff) | |
| download | archived-zen-3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7.tar.xz archived-zen-3d59b5d7036c35fe484d052ff32dbdc9d0a75cf7.zip | |
fix utf characters in source code (#953)
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/logging/broadcastsink.h | 4 | ||||
| -rw-r--r-- | src/zencore/include/zencore/mpscqueue.h | 2 | ||||
| -rw-r--r-- | src/zencore/include/zencore/process.h | 6 | ||||
| -rw-r--r-- | src/zencore/include/zencore/testutils.h | 22 | ||||
| -rw-r--r-- | src/zencore/include/zencore/zencore.h | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/zencore/include/zencore/logging/broadcastsink.h b/src/zencore/include/zencore/logging/broadcastsink.h index c2709d87c..474662888 100644 --- a/src/zencore/include/zencore/logging/broadcastsink.h +++ b/src/zencore/include/zencore/logging/broadcastsink.h @@ -17,7 +17,7 @@ namespace zen::logging { /// sink is immediately visible to all of them. This is the recommended way /// to manage "default" sinks that should be active on most loggers. /// -/// Each child sink owns its own Formatter — BroadcastSink::SetFormatter() is +/// Each child sink owns its own Formatter - BroadcastSink::SetFormatter() is /// intentionally a no-op so that per-sink formatting is not accidentally /// overwritten by registry-wide formatter changes. class BroadcastSink : public Sink @@ -63,7 +63,7 @@ public: } } - /// No-op — child sinks manage their own formatters. + /// No-op - child sinks manage their own formatters. void SetFormatter(std::unique_ptr<Formatter> /*InFormatter*/) override {} void AddSink(SinkPtr InSink) diff --git a/src/zencore/include/zencore/mpscqueue.h b/src/zencore/include/zencore/mpscqueue.h index d97c433fd..38a0bc14f 100644 --- a/src/zencore/include/zencore/mpscqueue.h +++ b/src/zencore/include/zencore/mpscqueue.h @@ -11,7 +11,7 @@ using std::hardware_constructive_interference_size; using std::hardware_destructive_interference_size; #else -// 64 bytes on x86-64 │ L1_CACHE_BYTES │ L1_CACHE_SHIFT │ __cacheline_aligned │ ... +// 64 bytes on x86-64 | L1_CACHE_BYTES | L1_CACHE_SHIFT | __cacheline_aligned | ... constexpr std::size_t hardware_constructive_interference_size = 64; constexpr std::size_t hardware_destructive_interference_size = 64; #endif diff --git a/src/zencore/include/zencore/process.h b/src/zencore/include/zencore/process.h index 19804795b..fd24a6d7d 100644 --- a/src/zencore/include/zencore/process.h +++ b/src/zencore/include/zencore/process.h @@ -34,7 +34,7 @@ public: /// Throws std::system_error on failure. explicit ProcessHandle(int Pid); - /// Construct from an existing native process handle. Takes ownership — + /// Construct from an existing native process handle. Takes ownership - /// the caller must not close the handle afterwards. Windows only. #if ZEN_PLATFORM_WINDOWS explicit ProcessHandle(void* NativeHandle); @@ -56,7 +56,7 @@ public: /// Same as Initialize(int) but reports errors via @p OutEc instead of throwing. void Initialize(int Pid, std::error_code& OutEc); - /// Initialize from an existing native process handle. Takes ownership — + /// Initialize from an existing native process handle. Takes ownership - /// the caller must not close the handle afterwards. Windows only. #if ZEN_PLATFORM_WINDOWS void Initialize(void* ProcessHandle); @@ -195,7 +195,7 @@ struct CreateProcOptions StdoutPipeHandles* StderrPipe = nullptr; // Optional separate pipe for stderr. When null, stderr shares StdoutPipe. /// Additional environment variables for the child process. These are merged - /// with the parent's environment — existing variables are inherited, and + /// with the parent's environment - existing variables are inherited, and /// entries here override or add to them. std::vector<std::pair<std::string, std::string>> Environment; diff --git a/src/zencore/include/zencore/testutils.h b/src/zencore/include/zencore/testutils.h index 2a789d18f..68461deb2 100644 --- a/src/zencore/include/zencore/testutils.h +++ b/src/zencore/include/zencore/testutils.h @@ -62,24 +62,24 @@ struct TrueType namespace utf8test { // 2-byte UTF-8 (Latin extended) - static constexpr const char kLatin[] = u8"café_résumé"; - static constexpr const wchar_t kLatinW[] = L"café_résumé"; + static constexpr const char kLatin[] = u8"caf\xC3\xA9_r\xC3\xA9sum\xC3\xA9"; + static constexpr const wchar_t kLatinW[] = L"caf\u00E9_r\u00E9sum\u00E9"; // 2-byte UTF-8 (Cyrillic) - static constexpr const char kCyrillic[] = u8"данные"; - static constexpr const wchar_t kCyrillicW[] = L"данные"; + static constexpr const char kCyrillic[] = u8"\xD0\xB4\xD0\xB0\xD0\xBD\xD0\xBD\xD1\x8B\xD0\xB5"; + static constexpr const wchar_t kCyrillicW[] = L"\u0434\u0430\u043D\u043D\u044B\u0435"; // 3-byte UTF-8 (CJK) - static constexpr const char kCJK[] = u8"日本語"; - static constexpr const wchar_t kCJKW[] = L"日本語"; + static constexpr const char kCJK[] = u8"\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E"; + static constexpr const wchar_t kCJKW[] = L"\u65E5\u672C\u8A9E"; // Mixed scripts - static constexpr const char kMixed[] = u8"zen_éд日"; - static constexpr const wchar_t kMixedW[] = L"zen_éд日"; + static constexpr const char kMixed[] = u8"zen_\xC3\xA9\xD0\xB4\xE6\x97\xA5"; + static constexpr const wchar_t kMixedW[] = L"zen_\u00E9\u0434\u65E5"; - // 4-byte UTF-8 (supplementary plane) — string tests only, NOT filesystem - static constexpr const char kEmoji[] = u8"📦"; - static constexpr const wchar_t kEmojiW[] = L"📦"; + // 4-byte UTF-8 (supplementary plane) - string tests only, NOT filesystem + static constexpr const char kEmoji[] = u8"\xF0\x9F\x93\xA6"; + static constexpr const wchar_t kEmojiW[] = L"\U0001F4E6"; // BMP-only test strings suitable for filesystem use static constexpr const char* kFilenameSafe[] = {kLatin, kCyrillic, kCJK, kMixed}; diff --git a/src/zencore/include/zencore/zencore.h b/src/zencore/include/zencore/zencore.h index a31950b0b..57c7e20fa 100644 --- a/src/zencore/include/zencore/zencore.h +++ b/src/zencore/include/zencore/zencore.h @@ -94,7 +94,7 @@ protected: // With no extra args: ZEN_ASSERT_MSG_("expr") -> "expr" // With a message arg: ZEN_ASSERT_MSG_("expr", "msg") -> "expr" ": " "msg" // With fmt-style args: ZEN_ASSERT_MSG_("expr", "msg", args...) -> "expr" ": " "msg" -// The extra fmt args are silently discarded here — use ZEN_ASSERT_FORMAT for those. +// The extra fmt args are silently discarded here - use ZEN_ASSERT_FORMAT for those. #define ZEN_ASSERT_MSG_SELECT_(_1, _2, N, ...) N #define ZEN_ASSERT_MSG_1_(expr) expr #define ZEN_ASSERT_MSG_2_(expr, msg, ...) expr ": " msg |